[CMake] Compling a plugin using MSYS/MinGW
Nathan Paul
nathanjpaul at gmail.com
Sun Apr 18 16:04:03 EDT 2010
I'm working on making a plugin manager for an application I'm writing. I
have it implemented, along with a test app, a C plugin, and a C++ plugin. I
use a .DEF file for exporting symbols from the plugins. The symbols have the
stdcall calling convention. The .DEF file is specified in my CMake source
list. When everything is compiled with MSVC, everything works as expected.
Now I wish to compile one of the plugins using MSYS/MinGW to ensure that the
plugins can be compiled in alternate compilers. However, the GetProcAddress
function fails to find the symbols I exported in the .DEF file. I used a
tool to examine the exported symbols from the dll generated by both MSVC and
MSYS/MinGW. The MSVC dll exports only the functions I specified. However,
the MSYS/MinGW dll exports much more than my .DEF file specified, and the
functions I do want exported have the name mangled according to the stdcall
calling convention. This leads me to believe that the .DEF file is not being
used when compiling using MSYS/MinGW. How can I have MSYS/MinGW use my .DEF
file?
Thanks,
--
Nathan Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100418/328b490e/attachment.htm>
More information about the CMake
mailing list