Posted: Mon Nov 12, 2012 2:11 pm Post subject: Ld.exe errors in code::blocks 10.05
Linking console executable: bin\Debug\dllINIT.exe
C:\Program Files (x86)\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -l-static-libgcc
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings
I am having issues with the linker or whatever... I do not know, no matter what piece of code that I write it always returns the same error.
In my linker settings for the compiler and project I linked the -static-libgcc and -static-libstdc++
I have looked over google and there are no similar problems, I looked for hours.
Any help is appreciated, thank you. This problem started occuring after a disk check, I tried a system restore, but it didn't help. I need help.
Thanks, Sincerely
~QP
Sponsor Sponsor
TerranceN
Posted: Mon Nov 12, 2012 11:15 pm Post subject: RE:Ld.exe errors in code::blocks 10.05
For some reason code::blocks is prepending "-l" to the linker option you give it (i.e. it should be -static-libgcc not -l-static-libgcc).
Without seeing how you set up your project all I can say to do is make sure those options are under the 'other linker options', the place shown here (ignore the other options).
QuantumPhysics
Posted: Tue Nov 13, 2012 8:39 am Post subject: RE:Ld.exe errors in code::blocks 10.05
added those but still no change same error. Thanks anyways.
TerranceN
Posted: Tue Nov 13, 2012 5:36 pm Post subject: Re: RE:Ld.exe errors in code::blocks 10.05
QuantumPhysics @ Tue Nov 13, 2012 8:39 am wrote:
added those but still no change same error. Thanks anyways.
Added those? Isn't 'Other linker options' the only place where you can put linker options?
QuantumPhysics
Posted: Tue Nov 13, 2012 5:39 pm Post subject: RE:Ld.exe errors in code::blocks 10.05
Linker settings in the global compiler as a whole, and the project builder
DemonWasp
Posted: Tue Nov 13, 2012 8:03 pm Post subject: RE:Ld.exe errors in code::blocks 10.05
Try removing them from the "Link Libraries" side of the dialog. That side is for non-standard libraries you want to include. Put your -static-libgcc on the "Other Linker Options" side of the dialog, or in "Compiler Options", depending on whether that's a linker setting or a compiler setting.
QuantumPhysics
Posted: Thu Nov 15, 2012 9:35 am Post subject: RE:Ld.exe errors in code::blocks 10.05
I tried, didn't work.
TerranceN
Posted: Thu Nov 15, 2012 11:37 am Post subject: RE:Ld.exe errors in code::blocks 10.05
If you don't mind nuking your compiler settings (Settings -> Compiler And Debugger -> Reset Defaults) and putting everything in the project settings, you could then give us the project file (.cbp) so that we can look over the settings.
If you don't want to loose your settings you could give us the compiler options file along with the project settings file, but I have no idea where it is (probably somewhere in code::blocks's installation directory, but I'm on ubuntu right now so I can't check).