Re: ?



On Sat, 10 Feb 2001, Peter Nilsson wrote:

I am pretty new with gtk-programming and I have a problem I cant solve.
When I compiling my code I dont get any complaints about the code,
instead I recieve this:

gcc -Wall -g `gnome-config --cflags gnomeui` -c geasyedit.c
gcc `gnome-config --libs gnomeui` geasyedit.o -o geasyedit
/usr/lib/crt1.o: In function `_start':
/usr/lib/crt1.o(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
make: *** [geasyedit] Error 1

Whats wrong?

It seems that you're missing a main() function in your program. The linker
can't call it and complains.

Put your toplevel function into main() like this:

int main (int argc, char *argv[])
{

  ...

  return 0;
}

Nils
-- 
 Nils Philippsen / Berliner Straße 39 / D-71229 Leonberg // +49.7152.209647
nils wombat dialup fht-esslingen de / nils fht-esslingen de / nils redhat de
   The use of COBOL cripples the mind; its teaching should, therefore, be
   regarded as a criminal offence.                  -- Edsger W. Dijkstra





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]