[Insight-users] help in FLTK/InsightApplication CMake config
Ryan Guan
ryan.guan at yahoo.com
Mon Nov 7 19:22:36 EST 2011
The problem has been solved! CMake seems to be tricky in some way, it may be because I don't know it so much, in case other rookie run into the same problem, I would write down what I've observed:
1. The reason to cause my earlier problem is that the configuration should set up automatically
FLTK_IMAGES_LIBRARY:FILEPATH=C:/Program Files (x86)/FLTK/lib/fltkimagesd.lib
FLTK_FORMS_LIBRARY:FILEPATH=C:/Program Files (x86)/FLTK/lib/fltkformsd.lib
FLTK_BASE_LIBRARY:FILEPATH=C:/Program Files (x86)/FLTK/lib/fltkd.lib
FLTK_GL_LIBRARY:FILEPATH=C:/Program Files (x86)/FLTK/lib/fltkgld.lib
I didn't got these at the first place, it might be because that I forgot to opt USE_FLTK after I re-configure,
BUT, I also need to set up manually FLTK_FLUID_EXECUTABLE and FLTK_INCLUDE_DIR before press configure button,
otherwise although it will prompt the two are missing, it still doesn't figure out the 4 libraries (no warning!) after making it up,
it needs to delete the cache and start over!
2. CMake doesn't work properly if Visual Studio is set to be opened with administrator privilege.
________________________________
From: Ryan Guan <ryan.guan at yahoo.com>
To: "insight-users at itk.org" <insight-users at itk.org>
Sent: Tuesday, November 8, 2011 9:39 AM
Subject: help in FLTK/InsightApplication CMake config
Dear ITKers,
Please help to look at what's wrong with my CMake setting when I tried to build InsightApplication 3.20.0 with FLTK 1.3.0.
IDE: Windows 7, VS2008.
FLTK was built successfully using CMake and VS2008 in Debug mode at C:/Project/fltk-1.3.0 (the binary directory for FLTK CMake),
and was installed to C:/Program Files (x86)/FLTK.
FLTK_FLUID_EXECUTABLE = C:/Program Files (x86)/FLTK/bin/fluid.exe
FLTK_INCLUDE_DIR = C:/Program Files (x86)/FLTK/include
The C:/Program Files (x86)/FLTK/libcontains fltkimagesd.lib fltkd.lib etc.
I was not sure what FLTK_DIR I should define for InsightApplication (build in Debug mode too), so I tried
<1> C:/Program Files (x86)/FLTK, can configure,
>but build-error in VS: fatal error LNK1104: cannot open file 'fltk_images.lib'.
>build command requires fltk_images.lib fltk_jpeg.lib fltk_png.lib fltk_zlib.lib...
>
><2> so I instead tried C:/Program Files (x86)/FLTK/CMake, as inspired by an earlier post.
>but the configure can't complete because it can't load CMakeCache.txt.
>I copied CMakeCache.txt from C:/Project/fltk-1.3.0 over, can configure.
>build error in VS: fatal error LNK1104: cannot open file 'fltk_zlib.lib'
>build command requires differently this time: "C:\Program Files (x86)\FLTK\lib\fltkimagesd.lib" "C:\Program Files (x86)\FLTK\lib\fltkjpegd.lib" "C:\Program Files (x86)\FLTK\lib\fltkpng.lib" fltk_zlib.lib "C:\Program Files (x86)\FLTK\lib\fltkd.lib" ...
>
>
>Seems that it get all right with the debug library except zlib!
>
>
<3> At last I tried C:/Project/fltk-1.3.0, the same error and command line as <1>.
<2> seems to be more correct as it might read settings in FLTKLibraries-debug.cmake in C:/Program Files (x86)/FLTK/CMake so that it get the lib files correct, but why only fltk_z is not correct?
Hope someone can enlighten me here that what's wrong and what else might be wrong in my settings?
Many many thanks!
Ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20111107/97e160b9/attachment.htm>
More information about the Insight-users
mailing list