[Insight-users] accessing and building Itk applications, FLTK + CMake

Luis Ibanez luis.ibanez@kitware.com
Sat, 08 Mar 2003 09:58:41 -0500


Hi Zein,

1) When FLTK builds the debug libraries it adds a "d" to their
    name in order to differentiate them from the release ones.

    You have to select a consistent configuration. That is:
    you build everything for Debug, or you build everthing for
    Release, but never mix them. That will lead to this unpleasant
    linking problems with VC++.


2) Yes, you should have a CMakeLists.txt file in your project.
    In theory you could do this by hand from the VisualStudio
    GUI... but it will take you weeks to get it right.
    CMake is the rapid and efficient way to go.

    Note that CMake was created because we got tired of struggling
    manually with configuration options in VC++ and Unix Makefiles.
    It is just not worth yours/our time. We are supposed to be doing
    medical imaging, instead of tweaking VC++ projects to see if
    in the 10th menu option we have checked the right check-box.

    Do yourself a favor, and pass one day understanding a basic
    CMakeLists.txt file. It will save you a lot of time down the road.

3) The GL library in fltk is named fltkgl.lib in windows, fltkgld.lib
    when is built for debugging.  In unix it is simply called
    libfltk_gl.a



Please let us know if you have further questions.


Thanks


Luis


-----------------------------------
salah wrote:

> 
> These errors seem to be produced by:
> 
> 1) You are linking the Debug library of FLTK
>     against a non debug build of the application
>     (those are the messages 'already defined') 


> You are right. But I built fltk by building the project "Demo" as you told me. 
> all libraries are ending with d. I guess it was a debug build. I dont actualy know what is the difference and how to build some other way. Is my building this way correct? If not, what should I do? Build application some other way? or build FLTK some other way? or both?
> 
> 2) You are not adding ITKCommon, ITKIO to the
>     list of libraries to link with in the
>     CMakeLists.txt file of your applications.
>    (those are the messages 'unresolved external
>     itk::Process... etc)
> You are again right. I do not even have CMakeList.txt file in my project. Should I have?? How to build this file and how to use it? PLEEEEEEASE do not ignore my last message regrding this problem. 
> 
> 3) You are not linking with the fltk_gl library
>     (those are the messages 'unresolved external
>      Fl_Gl_Window...)
> I realy do not have this library, I have an fltkgld.lib file in the \fltk-1.1.3\lib\. I think this is also related with point 1 above. Or? 
> 
> 
> 
> ->8<------------->8<------------->8<------------->8<------------->8<------------->8<-
> Zein I. Salah 
> University of Tübingen, WSI-GRIS, Sand 14, 72076 Tübingen 
> Email: salah@gris.uni-tuebingen.de
> Tel.: (07071) 29 75465 (GRIS),           Fax: (07071) 29 54 66
> 
>