News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

I don't think my code::blocks is using static libraries correctly.

Started by elSolar, January 02, 2011, 10:48:18 PM

Previous topic - Next topic

elSolar

I've been using code::blocks with MinGW to write, compile, and run code on Windows and it's been going fine so far except for one hitch. Lets say I make a program, helloworld.c, compile it, and run it in code::blocks. The program will run perfectly, printing Hello World in the console. If I actually find the file in my hard drive, however, and double click it, I receive the following error:

QuoteThe program can't start because libgcc_s_dw2-1.dll is missing from your computer. Try reinstalling the program to fix this problem.

So I go and find libgcc_s_dw2-1.dll in my MinGW directory and put in the same directory as helloworld.exe and create a helloworld.exe.local file and it works! So apparently my copy of MinGW is linking that DLL as a dynamic libray, instead of a static one included in the exe. This is quite an annoying issue, but I can't quite figure out how to fix it. My knowledge of GCC, MinGW, and code::blocks is elementary, and my Google-fu hasn't turned up any helpful information. Can anyone help me fix this issue, so that libgcc_s_dw2-1.dll isn't required to be in the same directory as my program?

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]