.dll file issue
Scinex
Posted messages
1
Registration date
Status
Member
Last intervention
-
[Dal] Posted messages 6122 Registration date Status Contributor Last intervention -
[Dal] Posted messages 6122 Registration date Status Contributor Last intervention -
Hello,
I am currently learning to code in class (first year of engineering school) and when I try to run a program coded with Code::Blocks from its .exe, I get the following error message: "Cannot execute the code because libgcc_s_dw2-1.dll is missing." If any of you could help me, I would be very grateful.
Configuration: Windows / Chrome 62.0.3202.94
I am currently learning to code in class (first year of engineering school) and when I try to run a program coded with Code::Blocks from its .exe, I get the following error message: "Cannot execute the code because libgcc_s_dw2-1.dll is missing." If any of you could help me, I would be very grateful.
Configuration: Windows / Chrome 62.0.3202.94
1 answer
-
Hello Scinex,
It's a dynamic library that you should find in the bin directory of MinGW used by your Code::Blocks.
One way to do this is to find it on your system and copy it into the same directory as the executable you generated to avoid this error message (or make it accessible in the Windows PATH).
Alternatively, you can compile by passing the option "-static" to the compiler so that the library is linked statically into the executable.
This is done in Project - Build Options - click on the root of both Debug and Release targets to apply it to both - Linker settings tab - Other linker settings (put-static
inside).
Do a Build - Clean and then a Build - Rebuild.
The size of your executable should have increased significantly (by nearly 600 KB for me, under Linux), but you will have linked the libraries from MinGW to your executable.
https://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Link-Options.html
Dal