Mail Archives: cygwin/1999/08/03/14:18:49
I've been trying to port (from MSVC) a handly little library (tkapp)
which eases building Tcl/Tk Win32 apps. It provides a WinMain function,
and imports an AppInit() and a string of Tcl application script, and
handles the messy init stuff.
However, when I try to link my little sample/test program against this
library, it's unable to find WinMain (specifically, "WinMain AT 16"). But,
if I link directly against the library objects, it works fine.
Example:
gcc -mwindows -mno-cygwin -o sample sample.o winMain.o tkapp.o -ltcl80
-ltk80
... works great. BUT ...
ar -cr ./libtkapp.a winMain.o tkapp.o
gcc -mwindows -L. -mno-cygwin -o sample sample.o -ltkapp -ltcl80
-ltk80
... and ...
gcc -mwindows -mno-cygwin -o sample sample.o ./libtkapp.a -ltcl80
-ltk80
... both fail with the following message:
/CYGNUS/CYGWIN~1/H-I586~1/BIN/../lib/gcc-lib/i586-cygwin32/2.95/../../../../i586-cygwin32/
lib/libmingw32.a(main.o): In function `main':
/home/noer/src/b20/comp-tools/devo/winsup/mingw/main.c:89: undefined
reference to
`WinMain AT 16'
collect2: ld returned 1 exit status
"objdump --syms libtkapp.a" reports:
...
winMain.o: file format pe-i386
SYMBOL TABLE:
[ 4](sec 1)(fl 0x00)(ty 20)(scl 2) (nx 1) 0x00000004 _WinMain AT 16
AUX lnno 0 size 0x0 tagndx 0
...
so it would seem that the correct object is included in the library.
Gak! Any ideas? I'm stumped, here.
-Steve
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -