On Saturday 02 September 2006 05:06, Harshal Shah wrote:
when i work with lex & yacc on novelsuse 10 ent. i found that i can compile lexspecification file.l completely. It generates lee.yy.c . In other linux we are able to compile lex.yy.c with command
"$ cc lex.yy.c -ll " then we see output "./a.out" . but in novelsuse 10 this command ("$ cc lex.yy.c -ll ") is not working & showing error with collect2 id and not having "-ll" option.
We'll need the whole compilation/link error to know for sure. Try
compiling without -ll, as that library contains only a stub main()
routine which calls the lexer (if i recall correctly).
Something to try:
cc -o foo.o lex.yy.c
If that works, the code compiles. Then try:
cc -o foo foo.o
If that fails, it's probably because your program doesn't have a main()
routine. If that happens, you can try adding the following code to a
separate file (main.c, taken from the flex info pages):
#include
suggest me what to do. how can i compile this in NovelSuse 10.
If you can send me the lex file off-list i can try it out on my 10.1 box. The problem may be related to differing flex versions on different environments. Distros are starting to ship versions of flex newer than 2.5.4, and not all of those releases actually generate compilable code. i believe that a collect2 error is a link error, though. -- ----- stephan@s11n.net http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts