Re: [vmtk-users] Problem in Compiling VMTK07rc in Windows
Brought to you by:
davidsteinman,
lucantiga
From: Luca A. <luc...@gm...> - 2008-07-21 11:20:49
|
I was taking a look now, but it really looks like there are only two possibilities in vtkITKWin32Header.h 1. that #if defined(vtkvmtkITK_EXPORTS) returns false. 2. that #defined(VTKITK_STATIC) returns true I personally opt for the second one. So, could you try to modify vtkITKWin32Header.h in the following way: from #if defined(WIN32) && !defined(VTKITK_STATIC) to #if defined(WIN32) && defined(VTKITK_STATIC) If this works, then a minor touch to vtkITKConfigure.h will do the trick. If it doesn't, can you go back to the original and instead change #if defined(vtkvmtkITK_EXPORTS) to #if !defined(vtkvmtkITK_EXPORTS) Thanks for your patience Luca On Jul 21, 2008, at 12:22 PM, Alessandro Chiarini wrote: > Hi Luca, > Good news! > I've already tried the first solution last week and makes all the > project building without errors. > The second one (dllimport) produces several error in linking, because > you're telling to the linker that those classes are already defined > somewhere and the linker cannot find the actual implementation (which > is defined with the dllexport keyword). > > I think that visual studio IDEs (at least until version 7.1) cannot > compile .h as standalone files and thus the vmtkITK.dll doesn't > contain the classed definitions that are stored in .h files. they are > contained in each other project that includes them. so this is why i > suggested to created a cxx file for each .h. > > I attach the log for the second option. > I look forward to hearing from you, and thanks for the support. > > Best Regards > > Alessandro > > > On Mon, Jul 21, 2008 at 11:03 AM, Luca Antiga > <luc...@gm...> wrote: >> Hi Alessandro, >> good point. Did you succeed in the end? >> >> As to creating cxx files, the Slicer project also uses the vtkITK >> library (actually, vmtk took it from there :-) ) but there are no >> linking problems under Windows, even without the cxx. >> >> I'm still convinced the problem can be fixed through the right >> defines. >> >> Could you please try to change vtkITKWin32Header.h >> >> from >> >> #include <vtkITKConfigure.h> >> >> #if defined(WIN32) && !defined(VTKITK_STATIC) >> #if defined(vtkvmtkITK_EXPORTS) >> #define VTK_ITK_EXPORT __declspec( dllexport ) >> #else >> #define VTK_ITK_EXPORT __declspec( dllimport ) >> #endif >> #else >> #define VTK_ITK_EXPORT >> #endif >> >> to simply >> >> #include <vtkITKConfigure.h> >> >> #define VTK_ITK_EXPORT __declspec( dllexport ) >> >> and then to >> >> #include <vtkITKConfigure.h> >> >> #define VTK_ITK_EXPORT __declspec( dllimport ) >> >> and let me know what messages you get? >> >> Thanks again for your precious help >> >> >> Luca >> >> >> >> On Jul 18, 2008, at 5:19 PM, Alessandro Chiarini wrote: >> >>> Hi Luca, >>> >>> Unfortunately some errors still persist. >>> I've the suspect that these errors are due to the fact that many >>> classes of the vtkvmtkITK project are defined in .h files and visual >>> studio doesn't compile .h file to build libraries. So, when you're >>> building other libraries that relies on this one, it can't find the >>> compiled code for linking. >>> To test this hypothesis I added the vtkITKImageToImageFF.cxx which >>> contains some members definition. My errors count decreased >>> considerably :-) >>> I can send you the file, if you want. >>> >>> I'll look forward to hearing from you >>> Best Regards >>> >>> Alessandro >>> >>> >>> On Fri, Jul 18, 2008 at 10:33 AM, Luca Antiga >>> <luc...@gm...> wrote: >>>> Dear Iman and Alessandro, >>>> thanks for your feedbacks. I'm starting to get the picture now. >>>> Can you please try the following: >>>> go to vmtk/vtkVmtk/Utilities/vtkITK/vtkITKWin32Header.h >>>> and change >>>> >>>> #if defined(vtkITK_EXPORTS) >>>> >>>> to >>>> >>>> #if defined(vtkvmtkITK_EXPORTS) >>>> >>>> and let me know what happens. >>>> >>>> Thanks again for your great help >>>> >>>> >>>> Luca >>>> >>>> >>>> >>>> On Jul 17, 2008, at 7:33 PM, Alessandro Chiarini wrote: >>>> >>>>> Hi Luca, >>>>> >>>>> I'm merging my thread with this one, because errors are similar >>>>> (in >>>>> most case the same, as well as I'm compiling in debug mode). >>>>> >>>>> I tried the patch you send me to cmkefile.txt but didn't work. >>>>> Thus, I'm attaching you the log file and my copy of cmake cache. >>>>> I'll look forward to hearing from you >>>>> >>>>> Best Regards >>>>> >>>>> Alessandro >>>>> >>>>> >>>>> On Wed, Jul 16, 2008 at 4:21 PM, Iman Khalaji <kh...@gm...> >>>>> wrote: >>>>>> Hi Luca, >>>>>> >>>>>> Please find attached CMakeCache.txt and the output errors. Hope >>>>>> these are >>>>>> what you asked me. >>>>>> In addition, I could not compile vmtk0.6 either. I do not know >>>>>> what I should >>>>>> do to fix it. >>>>>> >>>>>> Thanks for your time, >>>>>> Iman. >>>>>> >>>>>> Message: 3 >>>>>> Date: Wed, 16 Jul 2008 10:07:09 +0200 >>>>>> From: Luca Antiga <luc...@gm...> >>>>>> Subject: Re: [vmtk-users] Problem in Compiling VMTK07rc in >>>>>> Windows >>>>>> To: vmtk <vmt...@li...> >>>>>> >>>>>> Hi Iman, >>>>>> thank you for reporting. >>>>>> You're not the only one having problems with 0.7 on Windows, but >>>>>> let's see if we can solve this issue. >>>>>> It looks like problems are associated with the libraries using >>>>>> ITK. >>>>>> >>>>>> I have a couple of ideas, but can you please send me your >>>>>> CMakeCache.txt for vmtk and the error list you're getting upon >>>>>> compilation? >>>>>> >>>>>> Thanks a lot! >>>>>> >>>>>> Luca >>>>>> >>>>>> >>>>>> On Jul 14, 2008, at 10:13 PM, Iman Khalaji wrote: >>>>>> >>>>>>> Hi vmtk users, >>>>>>> >>>>>>> I have problems in compiling vmtk07rc in Windows (vista). >>>>>>> Although >>>>>>> I have followed almost all of instructions in VMTK main webpage, >>>>>>> these four items can not be compiled: >>>>>>> >>>>>>> vtkvmtkITK - 119 error(s), 12 warning(s) >>>>>>> vtkvmtkITKPythonD - 66 error(s), 0 warning(s) >>>>>>> vtkvmtkSegmentation - 277 error(s), 1 warning(s) >>>>>>> vtkvmtkITKTCL - 21 error(s), 25 warning(s) >>>>>>> Build: 26 succeeded, 4 failed, 2 up-to-date, 0 skipped >>>>>>> >>>>>>> I have compiled VTK 504 in "RelwithDebInfo" mode with Python and >>>>>>> TCL enabled. I have also compiled ITK 360 with CableSwig for >>>>>>> using >>>>>>> Python in "RelWithDebInfo" mode(I know that it is not >>>>>>> necessary to >>>>>>> have CSwig for vmtk). >>>>>>> >>>>>>> I am also adding the Environment Variablea being used in my >>>>>>> system >>>>>>> (just in case): >>>>>>> >>>>>>> ITK-DIR : C:\ITK_VTK\ITK\ITK360\ >>>>>> ITK360SRC >>>>>>> ITK_BINARY_DIR : C:\ITK_VTK\ITK\ITK360\ITK360BIN >>>>>>> VTKSOURCE : C:\ITK_VTK\VTK\VTK504\VTK504SRC >>>>>>> VTKBUILD : C:\ITK_VTK\VTK\VTK504\VTK504BIN >>>>>>> PYTHONROOT : C:\Python\Python4Coders24 >>>>>>> PYTHONPATH : %VTKBUILD%\Wrapping\Python;%VTKBUILD%;% >>>>>>> ITK_BINARY_DIR% >>>>>>> \Wrapping\CSwig\Python\RelWithDebInfo >>>>>>> TCL_LIBRARY : %PYTHONROOT%\tcl\tcl8.4 >>>>>>> TCLLIBPATH : %VTKSOURCE%\Wrapping\Tcl >>>>>>> Path : (some system variables here);%VTKBUILD%\bin >>>>>>> \RelWithDebInfo;% >>>>>>> ITK_BINARY_DIR%\bin\RelWithDebInfo;%PYTHONROOT%;%PYTHONROOT% >>>>>>> \tcl;% >>>>>>> PYTHONROOT%\tcl8.4.7\win\Release;%PYTHONROOT%\tk8.4.7\win >>>>>>> \Release;% >>>>>>> PYTHONROOT%\tcl8.4.7\generic;%PYTHONROOT%\tk8.4.7\generic;% >>>>>>> PYTHONROOT%\include;%PYTHONROOT%\libs; >>>>>>> >>>>>>> your help is really appreciated, >>>>>>> Iman. >>>>>> >>>>>> ----------------------------------------------------------------- >>>>>> -- >>>>>> -- >>>>>> ---- >>>>>> This SF.Net email is sponsored by the Moblin Your Move >>>>>> Developer's >>>>>> challenge >>>>>> Build the coolest Linux based applications with Moblin SDK & win >>>>>> great >>>>>> prizes >>>>>> Grand prize is a trip for two to an Open Source event anywhere in >>>>>> the world >>>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>>>>> _______________________________________________ >>>>>> vmtk-users mailing list >>>>>> vmt...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/vmtk-users >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>> >>> -------------------------------------------------------------------- >>> -- >>> --- >>> This SF.Net email is sponsored by the Moblin Your Move Developer's >>> challenge >>> Build the coolest Linux based applications with Moblin SDK & win >>> great prizes >>> Grand prize is a trip for two to an Open Source event anywhere in >>> the world >>> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >>> _______________________________________________ >>> vmtk-users mailing list >>> vmt...@li... >>> https://lists.sourceforge.net/lists/listinfo/vmtk-users >> >> >> --------------------------------------------------------------------- >> ---- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win >> great prizes >> Grand prize is a trip for two to an Open Source event anywhere in >> the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> vmtk-users mailing list >> vmt...@li... >> https://lists.sourceforge.net/lists/listinfo/vmtk-users >> >> <build.vmtk.log> > ---------------------------------------------------------------------- > --- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win > great prizes > Grand prize is a trip for two to an Open Source event anywhere in > the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > vmtk-users mailing list > vmt...@li... > https://lists.sourceforge.net/lists/listinfo/vmtk-users |