Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DLL creation: exporting library symbols

1 view
Skip to first unread message

Olumide

unread,
Jun 7, 2009, 7:24:10 PM6/7/09
to
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

unread,
Jun 7, 2009, 8:26:39 PM6/7/09
to
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

Giovanni Dicanio

unread,
Jun 8, 2009, 5:06:58 AM6/8/09
to

"Olumide" <50...@web.de> ha scritto nel messaggio
news:901583f2-ea26-46e1...@o20g2000vbh.googlegroups.com...

> 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


0 new messages