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:
The 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?