Discussion:
DLL creation: exporting library symbols
(too old to reply)
Olumide
2009-06-07 23:24:10 UTC
Permalink
Hi,

I'm writing my first dll consisting of several C++ classes, which I've
compiled to produce a dll and companion(?) lib file. The problem is
that the lib file contains no symbols. How can I get VS .NET to export
symbols for all the classes their methods? As I am utterly new to the
subject of DLL creation, I would prefer really simple explanations.

Thanks,

- Olumide
Scot T Brennecke
2009-06-08 00:26:39 UTC
Permalink
Hi Olumide,
I presume that this "companion" lib file is the "import library" that
was generated for client applications to link, creating a static
dependency on your DLL. Symbols do not go in .lib files of this sort.
When you are exporting classes from your DLL, there are a couple of ways
to do it:
1. Using __declspec(dllexport) in the declaration/definition of the
classes or other functions you are exporting.
2. Using a .DEF file and explicitly naming the symbols to be exported.

So, please explain two things in more detail: what you know you have,
and what you wanted/intended.

Scot
Post by Olumide
Hi,
I'm writing my first dll consisting of several C++ classes, which I've
compiled to produce a dll and companion(?) lib file. The problem is
that the lib file contains no symbols. How can I get VS .NET to export
symbols for all the classes their methods? As I am utterly new to the
subject of DLL creation, I would prefer really simple explanations.
Thanks,
- Olumide
Giovanni Dicanio
2009-06-08 09:06:58 UTC
Permalink
Post by Olumide
I'm writing my first dll consisting of several C++ classes, which I've
compiled to produce a dll and companion(?) lib file.
The problem is
that the lib file contains no symbols. How can I get VS .NET to export
symbols for all the classes their methods?
I would suggest you this tutorial on CodeProject:

http://www.codeproject.com/KB/DLL/RegDLL.aspx

Giovanni

Loading...