[Insight-users] including the txx files as part of the ITK project

Elena Pavlovskaia elena.pavlovskaia at otismed.com
Wed May 9 17:30:03 EDT 2007


Hi Mark,

I like having all the files that I am working on listed in my project.
Below I put an example on how I make it happen.

I have MyProject.dsw with sub projects My1.dsp, My2.dsp, etc.

The My1.dsp uses MyCode.h, MyCode.txx, and MyCode.cpp.

Here is a fragment from CMakeLists.txt correspondent to My1.dsp:


#  ------------------------------------------------------------------------
#  My1 project:


SET (My1DLL
  My1
  )


ADD_LIBRARY(${My1DLL}  MODULE
MyCode.h
MyCode.txx
MyCode.cxx
)

INSTALL_TARGETS(/lib ${My1DLL})
TARGET_LINK_LIBRARIES( ${My1DLL} ITKIO ITKCommon
ITKBasicFilters
)

#  --------------------End of My1 project --------------------------------

Elena



===========================================
Mark,

Just to add onto this, set the highlighting on, but don't set VS to 
directly compile the txx files (it doesn't by default).  You run the 
possibility of generating a whole bunch of Multiple instantiation (or 
something along those lines) errors.  I made that mistake originally.

Cheers,
Dan

Dan Mueller wrote:
> Hi Mark,
>
> The .txx files will be compiled if they are excluded or included from 
> the project.
>
> I have found it easiest to leave the project as CMake creates it. The 
> .txx files can be easily accessed by opening the associated .h file, 
> scrolling to the bottom, right-clicking the ITK_MANUAL_INSTANTIATION 
> #include line, and selecting "Open Document xxxxxx.txx". In Visual 
> Studio 2005 you can enable syntax highlighting by navigating to Tools 
> > Options > Text Editor > File Extensions and then adding the txx 
> extension with the C++ editor.
>
> HTH
>
> Cheers, Dan
>
> Mark Wyszomierski wrote:
>> Hi,
>> I just built a version of ITK for visual studio 2005. The project does
>> not seem to include the txx files which are sitting in the project
>> folder. I need to modify the txx files and have them compiled as well.
>> How do I get CMake or ITK to include the txx files as part of the
>> project?
>>
>> Thanks,
>> Mark
>> _______________________________________________


More information about the Insight-users mailing list