Page 1 of 1

Static Link libgcc and libstdc++

Posted: Sun Jun 07, 2020 12:18 am
by alecjcook
Hi,
I am trying to statically link the libgcc and libstdc++ libraries with my application, so that when I build it, I do not need "libgcc_s_dw2-1.dll" and "libstdc++-6.dll" respectivley in my build directory.
In Project Settings | Compiler | C++ Compiler Options: I have included "-static-libstdc++" and
In Project Settings | Compiler | C++ Compiler Options: i have included "-static-libgcc".
In Project Settings | Compiler | Include paths: I have placed "C:\MinGW\bin".

But when I run my application..

Debugger exited with the following error string:
"During startup program exited with code 0xc0000139."

Unless the above mentioned dll's are in the same directory as the .exe that I am building.
What am I doing wrong?
Many thanks, Alec


CodeLite Version 14.0.0
Downloaded, not self compiled
OS: Win 7
Compiler Version: MinGW 9.2.0

Re: Static Link libgcc and libstdc++

Posted: Sun Jun 07, 2020 7:19 pm
by eranif
if the flags were passed to gcc properly, than the problem is not in CodeLite but rather in GCC/MinGW