This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Problems linking a tk-based application with cygnus for win32


Hello,

I am porting a tk8.0-based program from Linux to Win32 using the Cygnus-tools.
All of my sources compiled nicely so far. I was able to link the program
with the Linux version main program (named josh.cc) which initializes
application specific commands, loads a tcl-script and starts tk_Main. The
linked application does a proper initialisation and starts a tcl-shell,
when executed under windows95, but it doesn't execute tk.

To get it display windows, I replaced the Linux based main-program by a new
win32-specific main-program using the winMain.c from the latest cygnus
sourcecode distribution as template.

I wasn't able to link the new program. Here are the linker errors which I
got:
 

g++  ./obj/josh.o ./obj/parser.o ./obj/lexer.o ... lot more obj-files ...
./obj/salm_p.o ./obj/salm_l.o -o bin/josh
-L/usr/lib -L/usr/X11/lib   -ltk80 -ltcl80 -lfl -lg++ -lm
./obj/josh.o(.text+0x2c):josh.cc: undefined reference to `SetMessageQueue@4'
./obj/josh.o(.text+0x31):josh.cc: undefined reference to `TkConsoleCreate'
./obj/josh.o(.text+0x2a4):josh.cc: undefined reference to `TkConsoleInit'
./obj/josh.o(.text+0x5aa):josh.cc: undefined reference to `MessageBeep@4'
./obj/josh.o(.text+0x5c2):josh.cc: undefined reference to `MessageBoxA@16'
C:\CYGNUS\B19\H-I386~1\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../libfl.a
(libmain.o)(.text+0x9):libmain.c: undefined reference to `yylex'
make: *** [bin/josh] Error 1
 

Leaving aside the last reference to yylex (which is mysterious) it seems,
that a library or some additional object-file is missing, but I wasn't able
to find something appropriate in the distribution.

May be the winMain.c file isn't appropriate for cygnus and I need a special
cygWinMain.c as template.

I would be very glad if someone could provide Information for me.

Thanks in advance

Joachim Faulhaber
 

PS: And thanks to the developers of cygnus -- it's fun to have gnu to work
with on Windoze ;-)
 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]