From: Benjamin R. <Ben...@ep...> - 2003-12-11 12:36:37
|
Hi Christopher, Christopher Sean Morrison <morrison@ARL.ARMY.MIL> writes: > The problem that I'm running into is that I can't seem to get our > binaries to NOT link against the system tcl/tk frameworks.. I only > want them to link against our version and specifying -L paths and -l > names or using -nodefaultlibs doesn't seem to do the trick. Example > compile for our modified-wish: > > cc -o bwish -nodefaultlibs -lm -lcc_dynamic main.o input.o tcl.o cmd.o > -L''../.libfb.pmac -lfb -L''../.libpkg.pmac -lpkg -L''../.libwdb.pmac > -lwdb -L''../.librt.pmac -lrt -L''../.libbn.pmac -lbn -L''../.libbu.pmac > -lbu -L''../.libtcl''8.4.''pmac -ltcl''8.4 > -L''../.libitcl''3.2.''pmac/itcl -litcl''3.2 -L''../.libtermio.pmac > -ltermio -L''../.libdm.pmac -ldm -L''../.libtk''8.4.''pmac -ltk''8.4 > -L''../.libtcl''8.4.''pmac -ltcl''8.4 -L''../.libitcl''3.2.''pmac/itk > -litk''3.2 -L''../.libitcl''3.2.''pmac/itcl -litcl''3.2 -L''/usr/X11R6/lib > -lXi -L''../.libfb.pmac -lfb -L''../.libpkg.pmac -lpkg -L''/usr/X11R6/lib > -lX11 -lXi -lXext -L''../.libtclcad.pmac -ltclcad -L''../.libsysv.pmac > -lsysv -lm -lc -framework Foundation vers.o You can use "otool -L" to check to which dynamic libraries and Frameworks a binary is actually linked. > hole:/usr/brlcad/src/.bwish.pmac administrator$ ./bwish > Tk_Init error Can't find a usable tk.tcl in the following directories: > /System/Library/Frameworks/Tcl.framework/Versions/8.4/Resources/tk8.4 > ./lib/tk8.4 ./lib/tk8.4 ./library ./library ./tk8.4.4/library > [...] > > If it had linked correctly, it should be looking in > /usr/brlcad/lib/* for the respective library script file. Have you tried to specify the library directory with the environment variable TK_LIBRARY? benny |