enrico68 Apprentice
Joined: 21 Oct 2016 Posts: 169
|
Posted: Sat Jan 20, 2018 7:12 pm Post subject: build error using codeblocks |
|
|
Hello,
I have an issue when trying to build the following C program with codeblocks:
Code: | #include <stdio.h>
main()
{
printf ("Hello!");
return 0;
} |
I get the following build error: /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/.../.../.../lib64/Scrtl.o In function '_start' :
(.text+0x20) Undefined reference to main
error: ld returned 1 exit status
It is my very first try at C, as I do not have any experience or knowledge about programming. If I run the same program with codeblocks in Windows, it works, here with Gentoo it does not. What is the problem? |
|