Hans J. Johnson wrote:
Cmake Experts,
I am running into a problem with static libraries and conflicting frameworks
on MacOSX. I need to statically build my own version of tcl and tk with X11
bindings and link it to my application. The problem is that the linker is
preferring to bind to the Tcl.framework and Tk.Framework dynamic libraries
instead of the ones that I specify.
----- Notice the explicitly specified link directories -----
[hjohnson]$ /usr/bin/c++ -bind_at_load -O2 -ftemplate-depth-50
-no-cpp-precomp -Wno-long-double -ftemplate-depth-50 -no-cpp-precomp
-Wno-long-double -DNO_ITK_TCL -O3 -DNDEBUG -headerpad_max_install_names
-fPIC "CMakeFiles/brains2.dir/tkAppInit.o"
"CMakeFiles/brains2.dir/tkInstallCommands.o" -o ../bin/brains2
-L/scratch/hjohnson/src/brains2/MacOSX/FAST/src/lib/InsightToolkit -L.
-L/scratch/hjohnson/src/brains2/MacOSX/FAST/src/lib -L/usr/X11R6/lib
-L/sw/lib -lb2Utils -liplGUI -lb2Utils -liplKernel -lITKBasicFilters -lITKIO
-lITKNrrdIO -litkgdcm -litkjpeg12 -litkjpeg16 -litkopenjpeg -litkpng
-litktiff -litkjpeg8 -lITKSpatialObject -lITKNumerics -lITKMetaIO
-lITKDICOMParser -lITKEXPAT -lITKniftiio -lITKznz -litkzlib -lqHull
-liplAlgorithms -liplObject -lgts -liplHeader -liplPixelTable -liplUtils
-liplLogging -lITKCommon -litkvnl_inst -litkvnl_algo -litkvnl -litknetlib
-litkvcl -litksys -lpthread -lm -lgts -lglib -lgmodule -lgthread -ltcl8.4
-ltk8.4 -lforms -lformsGL -lm -lX11 -lXext -lXmu -lXpm -lGLU -lGL
Add the -v option to the command line to see exactly what GCC is running
underneath.
-Brad
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake