Skip to main content
gamedev.net
🔒 Locked

DLL problem

Started by klems Jan 26, 2003 at 2:35 PM 3 replies 200+ views
Original Post
klems
klems
When I make a DLL in MSVC 6.0 using __declspec(dllexport), the names of the functions show up with some extra chars, which specifies parameters and stuff in the dependency viewer. I noticed that no Windows, DirectX or any other DLL functions show up like that, they just show the normal, undecoreated name of the functions. How do I create DLLs where the function names show up as they do in code, and might this be the reason why my DLLs don''t want to work when used in VB?
I tolerate no intolerance!
niyaw
niyaw
to kill name mangling, use extern "C" on your exports.

to kill leading underscore and trailing @<stack bytes>, if you have them, create a def file and use EXPORTS statement to export functions by their actual names.

[edited by - niyaw on January 26, 2003 3:44:55 PM]
klems
klems
How do I use DEF files (like syntax or something)? I''ve never needed them before, so my knowledge of them is kind of limited...



I tolerate no intolerance!
niyaw
niyaw
you open the docs and read them. sample def file:


  
LIBRARY Cool

EXPORTS

InitializeCool
TerminateCool
DoSomethingCool


where the XXXCool functions are exported by cool.dll.

then modify linker options in your project settings to use the def file you''ve created.
klems
klems
OK, thanks!



I tolerate no intolerance!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.