simple question
lrtaylor@micron.com
lrtaylor@micron.com
Fri Apr 16 19:26:00 GMT 2004
You forgot to include the source file on your command line...
Cheers,
Lyle
-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of Ramin NIkaeen
Sent: Friday, April 16, 2004 1:17 PM
To: gcc-help@gcc.gnu.org
Subject: simple question
Colleaugues,
To test the sanity of a certain static library (libFestival.a),
I am trying compiling a simple program and linking it to the library.
I get the /usr/lib/crt1.o(.text+0x18): undefined reference to `main'
error. Can someone tell me what is wrong?!
thanks a lot
ramin
-----------------------------------------------------------------
SOURCE CODE
-----------------------------------------------------------------
/*
-I/usr/local/publicVoiceXML/festival-1.4.3.old/src/include
-L/usr/local/publicVoiceXML/festival-1.4.3.old/src/lib
-lFestival
*/
void festival_initialize(int load_init_files,int heap_size);
int main()
{
festival_initialize(1,2);
return 0;
}
-----------------------------------------------------------------
COMPILATION
-----------------------------------------------------------------
g++ -L/usr/local/publicVoiceXML/festival-1.4.3.old/src/lib -lFestival
/usr/lib/crt1.o: In function `_start':
/usr/lib/crt1.o(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
jupiter.goldline.net:/home/rnikaeen/test/festival>
More information about the Gcc-help
mailing list