User forums > Help

No link with libc function

<< < (2/2)

MichelSimian:
This is the Bluid log after a Build>Clean


--- Code: ---
-------------- Build: Debug in bidon (compiler: GNU GCC Compiler)---------------

gcc.exe -Wall -g  -c C:\Users\Win7PRO\Documents\bidon\main.c -o obj\Debug\main.o
ld.exe  -o bin\Debug\bidon.exe obj\Debug\main.o   
obj\Debug\main.o: In function `main':
C:/Users/Win7PRO/Documents/bidon/main.c:5: undefined reference to `__main'
C:/Users/Win7PRO/Documents/bidon/main.c:6: undefined reference to `puts'
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 

--- End code ---

MichelSimian:
OK, I change the linker in mingw32-g++ as proposed, and it fixes the problem.

See new build with right linker command :


--- Code: ---
-------------- Build: Debug in bidon (compiler: GNU GCC Compiler)---------------

mingw32-g++.exe  -o bin\Debug\bidon.exe obj\Debug\main.o   
Output file is bin\Debug\bidon.exe with size 28.47 KB
Process terminated with status 0 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 

--- End code ---

Thanks a lot :)

Navigation

[0] Message Index

[*] Previous page

Go to full version