Hi
I'm creating a DLL using the borland compiler. Using the __cdecl convention with borland generate exported functions with a "_" prefix on each exported function (nuisance).

In the Borland IDE, I can add a .def file and alias these, to names without the "_" prefix, e.g.
.def file
LIBRARY     mylib.dll

EXPORTS
func1 = _func1
func2 = _func2

causing the resulting DLL to have both _func1 and func1 available, as I can see with a dll export viewer.

When I build the dll using CMAKE, however, even after adding the .def file, the resulting dll don't have the aliased names.

I have tried adding the def file to sources, but that seem no to work, and setting the module linker flags, e.g. set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} \"/DEF:${CMAKE_CURRENT_SOURCE_DIR}/myllib.def\"")

is not doing it either.

Anyone knowing how to do it properly?

-totte


--
.........................
Totte Karlsson, Ph.D.
Dune Scientific, LLC
425-296 1980 (office)
425-780 9648 (cell)
www.dunescientific.com
.........................

--

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

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

Reply via email to