Any tutorial about this?
#4

Never mind , I found the answer:

Код:
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).
But I dont use MinGw anymore .. it's just to different from other Programs.
Reply


Messages In This Thread
Any tutorial about this? - by ShOoBy - 25.03.2012, 18:46
Re: Any tutorial about this? - by T0pAz - 26.03.2012, 10:17
Re: Any tutorial about this? - by russo666 - 28.03.2012, 03:11
Re: Any tutorial about this? - by ShOoBy - 01.04.2012, 16:02
Re: Any tutorial about this? - by bashar0151 - 14.04.2012, 16:50
Re: Any tutorial about this? - by KarlMann - 30.06.2012, 01:02

Forum Jump:


Users browsing this thread: 1 Guest(s)