[Insight-developers] Compiling applications outside Insight tree

Luis Ibanez luis . ibanez at kitware . com
Tue, 27 Aug 2002 19:56:21 -0400


Hi Sayan,

The CMakeList.txt file seems to be missing:

  ${ITK_BINARY_DIR}/Code/Numerics/vxl

in the list of directories specified by

     LINK_DIRECTORIES (  )

It should be:

LINK_DIRECTORIES(
${ITK_BINARY_DIR}/Code/Common
${ITK_BINARY_DIR}/Code/BasicFilters
${ITK_BINARY_DIR}/Code/Algorithms
${ITK_BINARY_DIR}/Code/IO
${ITK_BINARY_DIR}/Code/Numerics
${ITK_BINARY_DIR}/Code/Numerics/vxl
)


The VXLNumerics library should be generated
in   ${ITK_BINARY_DIR}/Code/Numerics/vxl



Hope that helps,


Luis



=============================================




Sayan Pathak wrote:

> Hi,
> I was wondering if the someone could help me with compiling my app outside the ITK tree.
> I am using Visual Studio. I am attaching a CMakeFile.txt that allowed me to compile the code outside the tree while linking all the relevant libraries. By pointing at the right directory using CMake 
> 
> Now I get the following error:
> Compiling...
> MRFGaussianClassifierValidationApp.cxx
> Linking...
> LINK : fatal error LNK1104: cannot open file "VXLNumerics.lib"
> Error executing link.exe.
> 
> I have ensured that VXLNumerics.lib and other libs are in the right spots. We discussed this issue in the last TCON. Aljaz also reported a similar problem. I was wondering if this issue has been resolved.
> 
> Thanks,
> Sayan
> 
> 
> 
> ------------------------------------------------------------------------
> 
> PROJECT(IBSRclassification)
> 
> # 
> # Find ITK
> #
> FIND_PATH( ITK_BINARY_DIR itkConfigure.h )
> 
> # Load in the values from ITK if found
> IF ( ITK_BINARY_DIR )
>   LOAD_CACHE(${ITK_BINARY_DIR})
>   INCLUDE (${ITK_SOURCE_DIR}/itkCMakeOptions.cmake)
> ENDIF (ITK_BINARY_DIR )
> 
> INCLUDE_DIRECTORIES(
> ${ITK_SOURCE_DIR}/Code/Common
> ${ITK_SOURCE_DIR}/Code/BasicFilters
> ${ITK_SOURCE_DIR}/Code/Algorithms
> ${ITK_SOURCE_DIR}/Code/IO
> ${ITK_SOURCE_DIR}/Code/Numerics/Statistics
> ${ITK_SOURCE_DIR}/Examples/MultiResMIRegistration/Common
> ${IBSRclassification_SOURCE_DIR}/Common
> ${IBSRclassification_SOURCE_DIR}/Code
> )
> 
> LINK_DIRECTORIES(
> ${ITK_BINARY_DIR}/Code/Common
> ${ITK_BINARY_DIR}/Code/BasicFilters
> ${ITK_BINARY_DIR}/Code/Algorithms
> ${ITK_BINARY_DIR}/Code/IO
> )
> 
> LINK_LIBRARIES (
> VXLNumerics
> ITKCommon
> ITKBasicFilters
> ITKIO
> )
> 
> ADD_EXECUTABLE(GaussianClassifierValidationApp GaussianClassifierValidationApp)
> ADD_EXECUTABLE(KMeansClassifierValidationApp KMeansClassifierValidationApp)
> ADD_EXECUTABLE(MRFKMeansClassifierValidationApp MRFKMeansClassifierValidationApp)
> ADD_EXECUTABLE(MRFGaussianClassifierValidationApp MRFGaussianClassifierValidationApp)
> 
> 
> 
> 
> CMakeLists.txt
> 
> Content-Description:
> 
> CMakeLists.txt
> Content-Type:
> 
> text/plain
> Content-Encoding:
> 
> base64
> 
>