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
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to