OK...Trying to compile blt2.4v on a Red Hat 7.1 box with tcltk8.3.3 installed from source I got:
gcc -Wall -O6 -I. -I. -I/usr/X11R6/include -Wl,-rpath,/usr/X11R6/lib -o bltwish \
./bltUnixMain.c libBLT.a -ltk8.3 -ltcl8.3 -L/usr/X11R6/lib -lX11 -lm -lnsl -ldl
/tmp/ccYfBKk5.o: In function `main':
/tmp/ccYfBKk5.o(.text+0x82): undefined reference to `Tk_Main'
collect2: ld returned 1 exit status
make[1]: *** [bltwish] Error 1
make[1]: Leaving directory `/home/jaspert/build/blt2.4v/src'
make: *** [all] Error 2
I then tried...
$ nm /usr/lib/libtk8.3.so | grep Tk_Main
0002d880 T Tk_MainEx
0002394c T Tk_MainLoop
0003909c T Tk_MainWindow
00028670 T Tk_MaintainGeometry
$
Sure enough there is no Tk_main! It disappeared somewhere between versions 8.0 and 8.2, but this is supposed to have been tested on 8.3! Should I just substitute MainEx for Main in the BLT source code? I can't think of anything else.
Hoping for someone to offer flash of insight...
--Jasper
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem is that you have a mismatch between
the Tcl/Tk libraries and header files.
The libraries are version 8.3, but the header
files --I'm willing to guess-- are 8.0. The
Tk_Main function was turned into a macro at some
point (found in tk.h). Is 8.3 installed in
/usr/local?
Check the include files. You can force configure to explicitly point to those files.
OK...Trying to compile blt2.4v on a Red Hat 7.1 box with tcltk8.3.3 installed from source I got:
gcc -Wall -O6 -I. -I. -I/usr/X11R6/include -Wl,-rpath,/usr/X11R6/lib -o bltwish \ ./bltUnixMain.c libBLT.a -ltk8.3 -ltcl8.3 -L/usr/X11R6/lib -lX11 -lm -lnsl -ldl
/tmp/ccYfBKk5.o: In function `main':
/tmp/ccYfBKk5.o(.text+0x82): undefined reference to `Tk_Main'
collect2: ld returned 1 exit status
make[1]: *** [bltwish] Error 1
make[1]: Leaving directory `/home/jaspert/build/blt2.4v/src'
make: *** [all] Error 2
I then tried...
$ nm /usr/lib/libtk8.3.so | grep Tk_Main
0002d880 T Tk_MainEx
0002394c T Tk_MainLoop
0003909c T Tk_MainWindow
00028670 T Tk_MaintainGeometry
$
Sure enough there is no Tk_main! It disappeared somewhere between versions 8.0 and 8.2, but this is supposed to have been tested on 8.3! Should I just substitute MainEx for Main in the BLT source code? I can't think of anything else.
Hoping for someone to offer flash of insight...
--Jasper
The problem is that you have a mismatch between
the Tcl/Tk libraries and header files.
The libraries are version 8.3, but the header
files --I'm willing to guess-- are 8.0. The
Tk_Main function was turned into a macro at some
point (found in tk.h). Is 8.3 installed in
/usr/local?
Check the include files. You can force configure to explicitly point to those files.
./configure \ --with-tcl-includes=/usr/local/include \ --with-tk-include=/usr/local/include \ --with-tcl-libraries=/usr/local/lib \ --with-tk-libraries=/usr/local/lib
Please let me know if this doesn't work for you
(gah@siliconmetrics.com).
--gah