Compilation error: no "main" for wmluiltok.c

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

4 posts / 0 new
Last post
Compilation error: no "main" for wmluiltok.c

Submitted by wirawan0 on Wed, 02/04/2009 - 21:54.

I am trying to compile motif 2.3.1 for Ubuntu Linux 8.10 (Intrepid Ibex, platform: x86_64), and I got the following error:

gcc -g -O2 -Wall -g -fno-strict-aliasing -Wno-unused -Wno-comment -fno-tree-ter -I/usr/include/freetype2 -o wmluiltok wmluiltok.o -lXft /usr/lib/libjpeg.so -lpng -Wl,--rpath -Wl,/usr/lib -Wl,--rpath -Wl,/usr/lib
/usr/lib/gcc/x86_64-linux-gnu/4.3.2/../../../../lib/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
make[2]: *** [wmluiltok] Error 1
make[2]: Leaving directory `/data1/wirawan/BUILD/openmotif-2.3.1/tools/wml'
make[1]: *** [all-recursive] Error 1

Apparently this file (wmluiltok.c) does not have main() subroutine in it. I have trouble also compiling the same file awhile back with version 2.3.0. Can somebody help me with this? My configuration is simple: it is simply:

$ ./configure --prefix=/usr/local/motif-2.3.1

Wirawan

 

 

Thu, 02/05/2009 - 08:37#1

Yuriy Syrota

Re: Compilation error: no "main" for wmluiltok.c

It seems to be issue with yacc or lex, which versions yacc/byacc and lex/flex are used on your system?

 

Thu, 02/05/2009 - 18:27#2

Thu, 02/05/2009 - 18:27#2

wirawan0

Re: Compilation error: no "main" for wmluiltok.c

I think I didn't generate the file via "lex". It's the source file that already exists in the official openmotif 2.3.1. Please verify whether I am correct.

I also encountered the same kind of problem with another box (an x86-64 system also, running Fedora 8). So this is not an isolated Ubuntu problem.

Wirawan

Mon, 04/06/2009 - 09:41#3

Mon, 04/06/2009 - 09:41#3

fgenolini

option main for F: Compilation error: no "main" for wmluilto

You will need to add the line

%option main

at the start of wmluiltok.l

This will make flex generate a main function, which in turn will allow the compiler to succeed.