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 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 |
|||

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?
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
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.