The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 HELP: DLLs for Origin written with Visual C++ 5.0
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

marko

Germany
112 Posts

Posted - 02/09/1999 :  7:43:00 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,

did somebody use Visual C++ for building DLLs which can be used from Origin with the dll command? I would be very much interested, since I ran into problems with my C++ compiler. A colleague coded it with Borland C++ and it works, but VC doesn't do the job. Somehow the names inside the DLL look different. Using "dumpbin /exports mydll.dll" reveals that there is a question mark inserted before the name of the exported functions and also one can find something like "@@YAKZ@DFN" appended. I am not a freak in Windows programming, so I don't know how to sail around this cliff... Did somebody meet such problems? Any hints and tricks are wellcome!

Thanks in advance,
Marko

eparent

118 Posts

Posted - 02/25/1999 :  4:15:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Your compiler is working properly. What you are seeing is refered to as "name mangling". The added characters are used by the compiler and linker to describe the return type, number of arguments, and the argument types.

The Borland compilers have an option for turning this off. I am not aware of an option for VC. However, I suspect you are exporting your function with "__declspec( dllexport )" instead of a .DEF file. If your project does not have a .DEF file then adding one should solve your problem. The following is all you should need:

; simple DEF file
EXPORTS
ABELN

Once you have a DEF file you will no longer need "__declspec( dllexport )".

Go to Top of Page

marko

Germany
112 Posts

Posted - 02/26/1999 :  7:41:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for your response.
Lucklyly I already found this solution! You are right, the only thing I need to do is to insert the def file in my project. Ignoring the __dllspec leads to the expected result.

Thanks anyway.

Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000