[Insight-users] SOViewer can't find FILK location.Is it a bug
in SOViewer ?
Julien Jomier
julien.jomier at kitware.com
Sun Feb 19 15:58:39 EST 2006
Wordon,
MSVC 6 is kinda picky with templates. To overcome this issue you can
replace the line:
typedef itk::CellInterfaceVisitorImplementation<
PixelType,
typename OutputMeshType::CellTraits,
TriType,
VisitorType> VisitorImplType;
by
typedef typename OutputMeshType::CellTraits CellTraits;
typedef itk::CellInterfaceVisitorImplementation<
PixelType,
CellTraits,
TriType,
VisitorType> VisitorImplType;
Hope that helps,
Julien
wordon wrote:
> Hi, Julien :
> You are really a kind expert.
> It solves my problem completely.
> But,a further problem in Darcy project is appeared.
> When I compile the Darcy project using ALL _BUILD Win32-RELEASE in VC 6.0.
> It has a error message as below.
> I guess that whether the vc 6.0 compiler is too old,
> and that lead to this error appeared.
> Can you give some further suggestion?
> Thanks a lot. :)
> --------------------Configuration: TestRenderMeshSource - Win32
> Release--------------------
> Compiling...
> TestRenderMeshSource.cxx
> D:\darcy\itkSeashellMeshSource.txx(195) : error C2899: typename cannot be
> used outside a template declaration
> C:\Program Files\Microsoft Visual Studio\VC98\INCLUDE\xtree(552) :
> while compiling class-template member function 'void __thiscall
> itk::SeashellMeshSource<class itk::Mesh<float,3,class
> itk::DefaultStaticMeshTraits<float,3,3,float,float,float
>>>> ::UpdateShellCentroidsAndNormals(void)'
> Error executing cl.exe.
>
> ALL_BUILD - 1 error(s), 0 warning(s)
>
>
>
>
> -----Original Message-----
> From: Julien Jomier [mailto:julien.jomier at kitware.com]
> Sent: Sunday, February 19, 2006 4:34 AM
> To: wordon
> Cc: insight-users at itk.org
> Subject: Re: [Insight-users] SOViewer can't find FILK location.Is it a bug
> in SOViewer ?
>
> Wordon,
>
> Glad to hear that your problem is solved. The message your are getting
> from CMake can be solved by modifying the CMakeLists.txt file as follow
>
> replace
>
> ADD_EXECUTABLE(darcy darcy.cxx
> DarcyApp.cxx
> DarcyBase.cxx
> itkTracer.cxx )
>
> FLTK_WRAP_UI(darcy DarcyGUI.fl)
>
> by
>
> FLTK_WRAP_UI(darcy DarcyGUI.fl)
>
>
> ADD_EXECUTABLE(darcy darcy.cxx
> DarcyApp.cxx
> DarcyBase.cxx
> itkTracer.cxx
> ${darcy_FLTK_UI_SRCS}
> )
>
> Basically you just need to add
> ${darcy_FLTK_UI_SRCS} to the list of source files.
>
> Hope that helps,
>
> Julien
>
> wordon wrote:
>> That problem is solving by using CMake 2.2.3,
>> Thank you for your help.
>>
>> But,other problem is appeared when I build Darcy project.
>>
>> The error message as below :
>>
>> In CMake 2.2 the FLTK_WRAP_UI command sets a variable to the list of
> source
>> files that should be added to your executable or library.It appears that
> you
>> have not added these source files to your target.You should change your
>> CMakeLists.txt file to directly add the generated files to the target.For
>> example FLTK_WRAP_UI(foo src1 src2 src3) will create a variable named
>> foo_FLTK_UI_SRCS that contains the list of source to add to your target
>> when you call ADD_LIBRARY or ADD_EXECUTABLE.For now CMake 2.2 will add the
>> sources to your target for you as was done in CMake 2.0 and earlier.In the
>> future this may become an error.The problem was found while processing the
>> source directory:D:/darcy
>>
>> Focus on this problem,it seems like I must add a CMake command into the
>> CMakeLists.txt.
>>
>> But I don't know how to modify it.
>>
>> Can you give me some suggestion? (My CMakeLists.txt is on the attachment)
>>
>>
>> Thanks :)
>>
>> -----Original Message-----
>> From: Julien Jomier [mailto:julien.jomier at kitware.com]
>> Sent: Sunday, February 19, 2006 12:52 AM
>> To: wordon
>> Subject: Re: [Insight-users] SOViewer can't find FILK location.Is it a bug
>> in SOViewer ?
>>
>> That might be the problem. Can you upgrade to 2.2.3?
>>
>> Julien
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> PROJECT(Darcy)
>>
>>
> #---------------------------------------------------------------------------
>> FIND_PACKAGE(ITK)
>> IF(ITK_FOUND)
>> INCLUDE(${ITK_USE_FILE})
>> ELSE(ITK_FOUND)
>> MESSAGE(FATAL_ERROR "Cannot build without ITK. Please set ITK_DIR.")
>> ENDIF(ITK_FOUND)
>>
>> FIND_PACKAGE(FLTK)
>> IF(FLTK_FOUND)
>> INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
>> ELSE(FLTK_FOUND)
>> MESSAGE(FATAL_ERROR "Cannot build without FLTK. Please set FLTK_DIR.")
>> ENDIF(FLTK_FOUND)
>>
>> FIND_PACKAGE(VTK)
>> IF(VTK_FOUND)
>> INCLUDE (${VTK_USE_FILE})
>> ELSE(VTK_FOUND)
>> MESSAGE(FATAL_ERROR "Cannot build without ITK. Please set VTK_DIR.")
>> ENDIF(VTK_FOUND)
>>
>> # This should be found as a package
>> # --> Change this to point to the correct location
>> #SET(SOV_SOURCE_DIR /home/gavinb/projects/ITK/SOViewer)
>> #SET(SOV_BINARY_DIR ${SOV_SOURCE_DIR}/Build)
>> #INCLUDE(${SOV_SOURCE_DIR}/sovCMakeOptions.cmake)
>>
>> FIND_PACKAGE(SOV)
>> IF(SOV_FOUND)
>> INCLUDE (${SOV_USE_FILE})
>> ELSE(SOV_FOUND)
>> MESSAGE(FATAL_ERROR "Cannot build without SOV. Please set SOV_DIR.")
>> ENDIF(SOV_FOUND)
>>
>>
>> # Just so the generated GUI can find the Base class
>> INCLUDE_DIRECTORIES(${Darcy_SOURCE_DIR})
>>
>>
> #---------------------------------------------------------------------------
>> ADD_EXECUTABLE(TestTriangleCellWithNormalAndCentroid
>> TestTriangleCellWithNormalAndCentroid.cxx)
>>
>> TARGET_LINK_LIBRARIES(TestTriangleCellWithNormalAndCentroid
>> ITKCommon ITKIO)
>>
>>
> #---------------------------------------------------------------------------
>> ADD_EXECUTABLE(TestSeashellMeshSource TestSeashellMeshSource.cxx
> itkTracer.cxx)
>> TARGET_LINK_LIBRARIES(TestSeashellMeshSource
>> ITKCommon ITKIO)
>>
>>
> #---------------------------------------------------------------------------
>> ADD_EXECUTABLE(TestRenderMeshSource TestRenderMeshSource.cxx
> itkTracer.cxx)
>> TARGET_LINK_LIBRARIES(TestRenderMeshSource
>> ITKCommon ITKIO)
>>
>>
> #---------------------------------------------------------------------------
>> ADD_EXECUTABLE(darcy darcy.cxx
>> DarcyApp.cxx
>> DarcyBase.cxx
>> itkTracer.cxx )
>>
>> TARGET_LINK_LIBRARIES(darcy
>> ITKCommon ITKIO ITKSpatialObject
>> SOViewer
>> ${GLU_LIBRARY}
>> ${GLUT_LIBRARY}
>> ${FLTK_LIBRARY} )
>>
>> FLTK_WRAP_UI(darcy DarcyGUI.fl)
>>
>>
> #---------------------------------------------------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list