www.digitalmars.com         C & C++   DMDScript  

c++ - C++ Dll exports

reply Jean-Pierre H. Dumas <jeanpierre.dumas freesbee.fr> writes:
I have a working makefile to make a .lib from a bunch of C++ sources.
I try to make the same but in DLL, with the IDDE.
I can make the DLL, but the import lib is ~empty.

When I do a DLL for C from C files (not C++) I have to manualy make the
EXPORTS section of the .def file. ( EXPORTS _funct = func ...)
This does not work as easily for the C++ (adorned with   stuff)

Question : How can I make my .def file, and finally a working import lib?

This is for the FOX GUI library.

Jean-Pierre
Apr 23 2003
parent "Walter" <walter digitalmars.com> writes:
Try using __declspec(dllexport) on the declarations you want to have
exported.

"Jean-Pierre H. Dumas" <jeanpierre.dumas freesbee.fr> wrote in message
news:1103_1051127866 news.digitalmars.com...
 I have a working makefile to make a .lib from a bunch of C++ sources.
 I try to make the same but in DLL, with the IDDE.
 I can make the DLL, but the import lib is ~empty.

 When I do a DLL for C from C files (not C++) I have to manualy make the
 EXPORTS section of the .def file. ( EXPORTS _funct = func ...)
 This does not work as easily for the C++ (adorned with   stuff)

 Question : How can I make my .def file, and finally a working import lib?

 This is for the FOX GUI library.

 Jean-Pierre
Apr 23 2003