DLL creation: exporting library symbols

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
 
D

David Ching

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
 
S

Scot T Brennecke

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top