3

I am using Mingw environment, GCC compiler and Code::Blocks IDE to create an application that is supposed to work on different Windows versions, without the need of installing any other software. So, I am using the last version of GCC.

I have created the EXE on a Windows 7 and it works perfectly. I moved it on a Windows XP (recently installed, no .NET, no C++ redistributable, no gcc dlls and it asked me for the libgcc_s_dw2-1.dll and for the libstdc++-6.dll. They couldn't be found on the XP computer. With an older version of GCC this didn't happen.

So, I copied those two libraries inside the same folder as the executable. Now, it also worked on the XP.

What I would like is to link both libraries statically. I added the -static option to GCC but it looks like I don't have the static libraries, only the dynamic ones, so I wonder if somebody can tell me where can I download them from and how would I link them.

Thanks so much!

ali
  • 10,927
  • 20
  • 89
  • 138
  • 2
    I think, the windows way is to pack all needed dlls into installer of your application. – osgx Jun 30 '12 at 15:54
  • 1
    Try mingw flags "-static-libgcc -static-libstdc++" (seen [here](http://stackoverflow.com/q/4702732/196561)) – osgx Jun 30 '12 at 15:55
  • 2
    @osgx: those options are implied by `-static`, so he already knows they won't work. – ams Jun 30 '12 at 20:31
  • It looks like for Windows there are not static libraries to link, or I just can't find where they are for download – ali Jul 02 '12 at 12:49

0 Answers0