linking tk's winMain.o with libfl under cygnus: linker-error
Sun Aug 9 04:58:00 GMT 1998
I am working on porting a c++ program from linux to windoze. The
interface is implemented via an extension of tk's wish. I'm using
b19.1 on win95 and tcl/tk8.0.
Thanks to Mumit Khan (Mumit, thank you for your posting) I got the
needed to link everything together. But I couln't get rid of the
undefined reference to `yylex'
make: *** [myWish] Error 1
I figured out, that the error is independend of my own sources,
the following minimal myWish program:
------------- makefile: -----------------
ÃÂ ÃÂ ÃÂ gcc -c -I. tkConsole.c -o tkConsole.o
ÃÂ ÃÂ ÃÂ gcc -c winMain.c -o winMain.o
myWish: winMain.o tkConsole.o
ÃÂ ÃÂ ÃÂ gcc tkConsole.o winMain.o -o myWish -ltk80 -ltcl80
-lfl -lm -mwindows
where winMain.c and tkConsole.c are from the latest soucecode distrib
tk8.0. This program yields a proper wish-shell on my windoze95,
without the -lfl flag. Adding -lfl results in the linkererror reported
Since I'm using flex and bison in my own application, I have to
so I'm unable to link my program :( Another observation is, that
works normal when I am linking with the a usual main() like in
from unix. Also yylex() works fine then, when used.
Does anybody know how to solve the problem?
- am I missing something trivial ;-/ ?
- would the egcs compiler have the same problem ?
- are there alternative ways to build my application
ÃÂ (via: loadable extension - as suggested by Mumit Khan -
ÃÂ extending wish) How would that work?
Any help is much appreciated
-- Joachim Faulhaber
More information about the Cygwin