0

Possible Duplicate:
The program can't start because libgcc_s_dw2-1.dll is missing
Program can't find libgcc_s_dw2-1.dll

So im using the MinGw C++ Compiler(g++) and i created the simplest application which just prints "Hello World". Now i want to build this application not in debug mode, and to run it on another computer. I searched the net about this and i came across a post in which somebody used PEDUMP to see what DLL's did the program need, i used that and the simple Hello World just needs the Kernel32.dll(which obviously is located in the system32) and the libgcc_s_dw2-1.dll which i believe is of the MinGw compiler. Now how do i link the libgcc_s_dw2-1.dll to my application? Also is it linked inside(binded) the application(exe) or is it separated(not sure how linking works) and if its separated how do i tell the program in which directory to see for that particular dll? Hope i was clear because im not sure how to explain it.

#include<iostream>

using namespace std;

int main()
{
cout << "Hello";
}

`Here is the code @jarekczek

Community
  • 1
  • 1
cArn
  • 195
  • 7
  • 1
    Hint - it's called static compiling. – Blood Oct 05 '12 at 18:49
  • And all this time I thought the linker settled the score on module-dependencies. – WhozCraig Oct 05 '12 at 20:04
  • Usually mingw generated executables are depending only on windows libraries. Maybe you did something special during your build process and received this strange dependency. Did you simply run `g++ file.cpp`? How about `gcc`? Please publish your `hello_world.cpp`. – Jarekczek Oct 06 '12 at 08:12
  • Hmm, I confirm that. I thought that `gcc` and `g++` work the same way, but I also get this additional dependency, with `g++` only. Even after simplifying the code to use `printf`. – Jarekczek Oct 09 '12 at 06:31

0 Answers0