Page 1 of 1

init.c:(.text+0x34): undefined reference to `main'

Posted: 2013-04-11T10:33:09-07:00
by SamBlackmore
Hi,

I'm trying to compile the C example equivalent to convert.

When I type:

Code: Select all

cc -o logo_test `pkg-config --cflags --libs MagickWand` logo_test.c
I get the following message:

Code: Select all

/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.5.4/../../../crt1.o: In function `_start':
init.c:(.text+0x34): undefined reference to `main'
collect2: ld returned 1 exit status
I have searched the error and found several responses that talk about makefiles.
I'm still fairly new to Linux and don't know anything about makefiles.
Any help would be greatly appreciated!!!

I also tried:

Code: Select all

cc -o logo_test `pkg-config --cflags --libs MagickWand` logo_test.c -nostdlib
Which gave me:

Code: Select all

/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.5.4/../../../../arm-angstrom-linux-gnueabi/bin/ld: warning: cannot find entry symbol _start; d
efaulting to 000083e4