Static Link libgcc and libstdc++

General questions regarding the usage of CodeLite
alecjcook
CodeLite Curious
Posts: 1
Joined: Sun Jun 07, 2020 12:05 am
Genuine User: Yes
IDE Question: C++
Contact:

Static Link libgcc and libstdc++

Post 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
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Static Link libgcc and libstdc++

Post by eranif »

if the flags were passed to gcc properly, than the problem is not in CodeLite but rather in GCC/MinGW
Make sure you have read the HOW TO POST thread
Post Reply