Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / extern "C", will it work with plugs

Author
Message
Three Score
20
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 23rd Nov 2005 02:23 Edited at: 23rd Nov 2005 02:55
Will extern "C" functions work as a dbp dll so that i dont have to mess around with .def files in mingw

edit:
another thing, what type should i use to pass a character(char)

tutorials,programs,useful but simple php scripts, a place for code snipplets and more at
http://hackr83.0z0.co.uk
(still under construction)
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd Nov 2005 14:20
extern "C" will work, but you still have to 'mess around' with .def files. The extern "C" stuff only makes the compiler use the unmangled name within the DLL.

Characters should generally be passed as strings.

For free Plug-ins and source code http://www.matrix1.demon.co.uk
Three Score
20
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 23rd Nov 2005 18:57
why is just C(not c++) you dont have to use .def files(mingw)

tutorials,programs,useful but simple php scripts, a place for code snipplets and more at
http://hackr83.0z0.co.uk
(still under construction)
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 24th Nov 2005 19:01
Is that a sentence? If so, can you try again?

In the meantime ...

extern "C" does not cause the function names to be exported.
extern "C" does stop the name mangling from taking place on the function name.

I suspect what you are looking for is to prefix the function definitions with:

__declspec(dllexport)

That will instruct the compiler/linker to export the name in the same way that .def files do.

For free Plug-ins and source code http://www.matrix1.demon.co.uk

Login to post a reply

Server time is: 2024-11-21 19:24:08
Your offset time is: 2024-11-21 19:24:08