[Insight-users] Compile error related to FLTK in Visual C++
Stephen R. Aylward
aylward@unc.edu
Wed, 20 Nov 2002 14:48:00 -0500
All FLTK apps new require linking with comctl32.lib
I recommend changing the findFLTK.cmake module, but I am certain others
will disagree with this approach. Nevertheless, it works:
At the end of the IF(FLTK_INCLUDE_PATH) block, before the
SET(FLTK_LIBRARY line (i.e., after line 62) add:
IF(WIN32)
SET (FLTK_SYSTEM_LIBRARY
wsock32
comctl32
)
ENDIF(WIN32)
IF(UNIX)
SET (FLTK_SYSTEM_LIBRARY
${CMAKE_X_LIBS}
)
ENDIF(UNIX)
then change the SET(FLTK_LIBRARY line right before
ENDIF(FLTK_INCLUDE_PATH) to:
SET( FLTK_LIBRARY ${FLTK_BASE_LIBRARY} ${FLTK_GL_LIBRARY}
${FLTK_FORMS_LIBRARY} ${FLTK_IMAGES_LIBRARY} ${FLTK_SYSTEM_LIBRARY})
Stephen
Steve Boyd wrote:
> Hi,
>
> I'm building ITK for the first time (v1.0.0), including FLTK (v1.1.1).
> After creating my workspace file with Cmake and compiling, I got the
> following error regarding an unresolved external error during linking.
>
> Should I be using a different version of FLTK? Any other suggestions to
> resolve the problem?
>
> Sincerely,
>
> Steve
>
> --------------------Configuration: DistanceMapFilter - Win32
> Debug--------------------
> Linking...
> Creating library C:\Documents and Settings\User\My
> Documents\pack\bin\itk\bin\Debug/DistanceMapFilter.lib and object
> C:\Documents and Settings\User\My
> Documents\pack\bin\itk\bin\Debug/DistanceMapFilter.exp
> fltkd.lib(Fl_x.obj) : error LNK2001: unresolved external symbol
> __imp___TrackMouseEvent@4
> C:\Documents and Settings\User\My
> Documents\pack\bin\itk\bin\Debug/DistanceMapFilter.exe : fatal error
> LNK1120: 1 unresolved externals
> Error executing link.exe.
>
> ALL_BUILD - 2 error(s), 0 warning(s)
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
--
===============================================
Dr. Stephen R. Aylward
Assistant Professor of Radiology
Adjunct Assistant Professor of Computer Science
http://caddlab.rad.unc.edu
aylward@unc.edu
(919) 966-9695