[Insight-developers] Compiling applications outside Insight tree

Sayan Pathak spathak at insightful . com
Tue, 27 Aug 2002 17:27:13 -0700


Hi Luis,
Thanks, That did help me to get over that particular barrier. But then =
it asks about itkpng.lib. When that is included it asks for MetaIO.lib =
and so on. Eventhough I am not using any MetaIO objects.=20
It looks like Aljaz's fix of including all possible libraries (the ones =
I need and the ones I don't) is the way out. I prefer the old way though =
where only the ones I need were specified.

Sayan

> -----Original Message-----
> From: Luis Ibanez [mailto:luis.ibanez@kitware.com]
> Sent: Tuesday, August 27, 2002 4:56 PM
> To: Sayan Pathak
> Cc: insight-developers@public.kitware.com
> Subject: Re: [Insight-developers] Compiling applications=20
> outside Insight
> tree
>=20
>=20
>=20
> Hi Sayan,
>=20
> The CMakeList.txt file seems to be missing:
>=20
>   ${ITK_BINARY_DIR}/Code/Numerics/vxl
>=20
> in the list of directories specified by
>=20
>      LINK_DIRECTORIES (  )
>=20
> It should be:
>=20
> 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
> )
>=20
>=20
> The VXLNumerics library should be generated
> in   ${ITK_BINARY_DIR}/Code/Numerics/vxl
>=20
>=20
>=20
> Hope that helps,
>=20
>=20
> Luis
>=20
>=20
>=20
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>=20
>=20
>=20
>=20
> Sayan Pathak wrote:
>=20
> > Hi,
> > I was wondering if the someone could help me with compiling=20
> my app outside the ITK tree.
> > I am using Visual Studio. I am attaching a CMakeFile.txt=20
> that allowed me to compile the code outside the tree while=20
> linking all the relevant libraries. By pointing at the right=20
> directory using CMake=20
> >=20
> > Now I get the following error:
> > Compiling...
> > MRFGaussianClassifierValidationApp.cxx
> > Linking...
> > LINK : fatal error LNK1104: cannot open file "VXLNumerics.lib"
> > Error executing link.exe.
> >=20
> > I have ensured that VXLNumerics.lib and other libs are in=20
> the right spots. We discussed this issue in the last TCON.=20
> Aljaz also reported a similar problem. I was wondering if=20
> this issue has been resolved.
> >=20
> > Thanks,
> > Sayan
> >=20
> >=20
> >=20
> >=20
> --------------------------------------------------------------
> ----------
> >=20
> > PROJECT(IBSRclassification)
> >=20
> > #=20
> > # Find ITK
> > #
> > FIND_PATH( ITK_BINARY_DIR itkConfigure.h )
> >=20
> > # 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 )
> >=20
> > 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
> > )
> >=20
> > LINK_DIRECTORIES(
> > ${ITK_BINARY_DIR}/Code/Common
> > ${ITK_BINARY_DIR}/Code/BasicFilters
> > ${ITK_BINARY_DIR}/Code/Algorithms
> > ${ITK_BINARY_DIR}/Code/IO
> > )
> >=20
> > LINK_LIBRARIES (
> > VXLNumerics
> > ITKCommon
> > ITKBasicFilters
> > ITKIO
> > )
> >=20
> > ADD_EXECUTABLE(GaussianClassifierValidationApp=20
> GaussianClassifierValidationApp)
> > ADD_EXECUTABLE(KMeansClassifierValidationApp=20
> KMeansClassifierValidationApp)
> > ADD_EXECUTABLE(MRFKMeansClassifierValidationApp=20
> MRFKMeansClassifierValidationApp)
> > ADD_EXECUTABLE(MRFGaussianClassifierValidationApp=20
> MRFGaussianClassifierValidationApp)
> >=20
> >=20
> >=20
> >=20
> > CMakeLists.txt
> >=20
> > Content-Description:
> >=20
> > CMakeLists.txt
> > Content-Type:
> >=20
> > text/plain
> > Content-Encoding:
> >=20
> > base64
> >=20
> >=20
>=20
>=20
>=20
>=20
>=20