From: jofa AT cs DOT tu-berlin DOT de (Joachim Faulhaber) Subject: Problems linking a tk-based application with cygnus for win32 6 Aug 1998 13:57:26 -0700 Message-ID: <35C9C441.591756D6.cygnus.gnu-win32@cs.tu-berlin.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------8A14510B5C22E525BC81E663" To: gnu-win32 AT cygnus DOT com --------------8A14510B5C22E525BC81E663 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 AT 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 AT 4' ../obj/josh.o(.text+0x5c2):josh.cc: undefined reference to `MessageBoxA AT 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 ;-) --------------8A14510B5C22E525BC81E663 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit 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 AT 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 AT 4'
./obj/josh.o(.text+0x5c2):josh.cc: undefined reference to `MessageBoxA AT 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 ;-)
 
  --------------8A14510B5C22E525BC81E663-- - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".