DLL creation: exporting library symbols

  • Thread starter Thread starter Olumide
  • Start date Start date
O

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
 
Olumide said:
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.

Check out __declspec(dllexport).

-- David
 
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
 
Back
Top