collect2: installation problem, cannot exec 'c:\Program Files\codeblocks\MinGW\bin\ld.exe' : invalid argument
Hi allChange "Settings -> Compiler and debugger... -> Global compiler settings -> [the compiler you use] -> Other settings(rightmost tab)" "Compiler logging" to "Full commandline" and post the content of the build log, that leads to this error.
I have the latest C::B and using it in both PC and laptop(both Vista) i have no problem in my PC but in laptop when i try to compile even a "hello world" i got this error.
Quotecollect2: installation problem, cannot exec 'c:\Program Files\codeblocks\MinGW\bin\ld.exe' : invalid argument
Hi allChange "Settings -> Compiler and debugger... -> Global compiler settings -> [the compiler you use] -> Other settings(rightmost tab)" "Compiler logging" to "Full commandline" and post the content of the build log, that leads to this error.
I have the latest C::B and using it in both PC and laptop(both Vista) i have no problem in my PC but in laptop when i try to compile even a "hello world" i got this error.
Quotecollect2: installation problem, cannot exec 'c:\Program Files\codeblocks\MinGW\bin\ld.exe' : invalid argument
Also you should provide some more information: which version of C::B do you use, which version of MinGW,
You can try to compare both C::B generated commandlines, the one that works and the one tha does not, maybe it gives you a hint.
mingw32-g++.exe -o bin\Debug\test.exe obj\Debug\main.o
collect2: installation problem, cannot exec `C:\Program Files\CodeBlocks\MinGW\bin\ld.exe': Invalid argument
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
Change "Settings -> Compiler and debugger... -> Global compiler settings -> [the compiler you use] -> Other settings(rightmost tab)" "Compiler logging" to "Full commandline" and post the content of the build log, that leads to this error.
Change "Settings -> Compiler and debugger... -> Global compiler settings -> [the compiler you use] -> Other settings(rightmost tab)" "Compiler logging" to "Full commandline" and post the content of the build log, that leads to this error.
You forgot to do this part first it appears.
mingw32-g++.exe -o bin\Debug\test.exe obj\Debug\main.o
I'm using C::B 8.02 with the default MinGW which included in the installation pack.
I'm using C::B 8.02 with the default MinGW which included in the installation pack.
The default MinGW with C::B 8.02; is not Vista Compatible! Without a lot of work.
Tim S
http://www.mingw.org/ is a place to start looking for MinGW or http://sourceforge.net/projects/mingw/.
Tim S
OK, then live with it not working.
Bye,
Tim S.
OK, then live with it not working.
Bye,
Tim S.
And if you don't know any solution let others find or suggest any!
gcc.exe -v
gcc version 3.4.5 (mingw-vista special r3)
You can try to compare both C::B generated commandlines, the one that works and the one tha does not, maybe it gives you a hint.
mingw32-g++.exe -c C:\Users\hadi\Documents\test.cpp -o C:\Users\hadi\Documents\test.o
mingw32-g++.exe -o C:\Users\hadi\Documents\test.exe C:\Users\hadi\Documents\test.o
Process terminated with status 0 (0 minutes, 0 seconds)
mingw32-g++.exe -o bin\Debug\test.exe obj\Debug\main.o
collect2: installation problem, cannot exec `C:\Program Files\CodeBlocks\MinGW\bin\ld.exe': Invalid argument
Let me guess:
the first one (on your PC) is a standalone-file, without a project,
the second one (on the laptop) is a project you compile.
Nevertheless that should not make a different except for the file paths.
Try to make sure, you do not have any spaces in the projects and in the programs path.
If I remember right there are MinGW versions that have problems with spaces in the path.
If all that does not work, I strictly recommend to use a newer (really vista-compatible) of MinGW ad Tim stated before.
mingw32-g++.exe -Wall -fexceptions -g -c C:\Users\hadi\Documents\test\main.cpp -o obj\Debug\main.o
gcc version 3.4.5 (mingw-vista special)