Hi all,
I just setup CodeBlock (nightly build) with MinGW 4.3.0 (20-40) but when I tried to test it with a simple function:
#include <windows.h>
int WinMain(HINSTANCE,HINSTANCE,LPSTR,int)
{
MessageBox(0,"Hello, Windows","MinGW Test Program",MB_OK);
return 0;
}
It said:
ld: crtbegin.o: No such file: No such file or directory
Here is the build log:
mingw32-g++.exe -IC:\MinGW -IC:\MinGW\lib -IC:\MinGW\include -IC:\MinGW\bin -IC:\MinGW\libexec -IC:\MinGW\libexec\gcc\mingw32\4.3.0 -IC:\MinGW\lib\gcc\mingw32\4.3.0 -IC:\MinGW\include\c++\4.3.0\backward -IC:\MinGW\include\c++\4.3.0\bits -IC:\MinGW\include\c++\4.3.0\debug -IC:\MinGW\include\c++\4.3.0\ext -IC:\MinGW\lib\gcc\mingw32\4.3.0\include -IC:\MinGW\include\c++\4.3.0\mingw32\bits -ID:\CProjects\Test -c D:\CProjects\Test\hellowin.cpp -o D:\CProjects\Test\hellowin.o
mingw32-g++.exe -LC:\MinGW\lib -LC:\MinGW\lib\gcc\mingw32\4.3.0 -LC:\MinGW\include -o D:\CProjects\Test\hellowin.exe D:\CProjects\Test\hellowin.o
ld: crtbegin.o: No such file: No such file or directory
Process terminated with status 1 (0 minutes, 1 seconds)
0 errors, 0 warnings
Build log saved as:
There are files that have been generated hellowin.o and hellowin.exe but hellowin.exe can not run. Could you kindly explain why crtbegin.o can not be found while it is located in the include path C:\MinGW\lib\gcc\mingw32\4.3.0 ?
Thanks
[attachment deleted by admin]