User forums > Help
ld.exe invalid argument
hadirj:
--- Quote from: stahta01 on August 01, 2009, 06:35:27 am ---OK, then live with it not working.
Bye,
Tim S.
--- End quote ---
And if you don't know any solution let others find or suggest any!
stahta01:
--- Quote from: hadirj on August 01, 2009, 06:45:44 am ---
--- Quote from: stahta01 on August 01, 2009, 06:35:27 am ---OK, then live with it not working.
Bye,
Tim S.
--- End quote ---
And if you don't know any solution let others find or suggest any!
--- End quote ---
I told you a solution, but you do not want to try it.
Here's the hard way to fix the problem.
Edit: I am still guessing it is an MinGW Vista issue; since the version of MinGW Shipped with Code::Blocks is known to NOT work with Vista, I consider replacing it the first step.
http://wiki.codeblocks.org/index.php?title=Installing_MinGW_with_Vista
Tim S.
Note: The "mingw-vista special r3" was the first no bug version of 3.4.5 that worked with Vista
The command
--- Code: ---gcc.exe -v
--- End code ---
Returns below for me.
--- Code: ---gcc version 3.4.5 (mingw-vista special r3)
--- End code ---
hadirj:
--- Quote from: jens on July 31, 2009, 11:30:50 am ---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.
--- End quote ---
Good!
I have this in PC which works fine
--- Quote ---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)
--- End quote ---
but in the laptop
--- Quote ---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
--- End quote ---
Jenna:
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.
hadirj:
--- Quote from: jens on August 01, 2009, 11:35:04 am ---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.
--- End quote ---
Ok!
these is the log for the project in PC and the command still different plus there is no space in path the project path on the laptop
--- Quote ---mingw32-g++.exe -Wall -fexceptions -g -c C:\Users\hadi\Documents\test\main.cpp -o obj\Debug\main.o
--- End quote ---
and this is the MinGW version which i use
--- Quote ---gcc version 3.4.5 (mingw-vista special)
--- End quote ---
BTY I'll test it with newer MinGW(I should download the new ver, Install it and just change the path of compiler and linkers in settings--> compiler and debugger and no need to install GDB or anything else! right?)
Navigation
[0] Message Index
[*] Previous page
Go to full version