01.04.2012, 16:02
Never mind , I found the answer:
But I dont use MinGw anymore .. it's just to different from other Programs.
Код:
Building the DLL To build the DLL use the following commands: g++ -c -DBUILDING_EXAMPLE_DLL example_dll.cpp g++ -shared -o example_dll.dll example_dll.o -Wl,--out-implib,libexample_dll.a The -DBUILDING_EXAMPLE_DLL compiler option causes the DLL's functions to be declared as "dllexport", meaning that they will be "exported" from the DLL and available to client applications. The "-shared" option tells the linker to create a DLL instead of an .exe, and the "--out-implib" linker option causes an import library to be created, which is used later on. Note: The import library created by the "--out-implib" linker option is required iff (==if and only if) the DLL shall be interfaced from some C/C++ compiler other than the MinGW toolchain. The MinGW toolchain is perfectly happy to directly link against the created DLL. More details can be found in the ld.exe info files that are part of the binutils package (which is a part of the toolchain).