LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   C Compile error (https://www.linuxquestions.org/questions/programming-9/c-compile-error-202626/)

LuderForChrist 07-08-2004 11:48 AM

C Compile error
 
Fixed all the errors, but am getting this instead!

Im sure this has been posed a million times but I couldn't find it in the search.

Code:

/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../crt1.o(.text+0x18): In function `_start':
../sysdeps/i386/elf/start.S:77: undefined reference to `main'
collect2: ld returned 1 exit status


itsme86 07-08-2004 12:33 PM

Do you get that with all programs you try to compile or just one...?

The_Nerd 07-08-2004 01:01 PM

You don't have a "main".

Example:

int main(int argc, char **argv)
{
printf("Program start\n");
printf("Program end\n");
}

(1): You don't have a main function
(2): You are not linking the object file that contains main

LuderForChrist 07-08-2004 02:40 PM

Once again thanks for helpin the :newbie: out


All times are GMT -5. The time now is 01:41 AM.