Skip to main content
gamedev.net
🔒 Locked

devc++ & dlls

Started by quasar3d 1 reply 650+ views
Original Post
quasar3d
quasar3d
I''m making a dll with devc++, and I don''t know how to export things. I''ve searched all the option dialogs, but I couldn''t find anything. I also tried to modify the .def file manually, but once I saved my project, it was the old one again. How do I do this? My Site
BouncePup
BouncePup
Instead of using a def file why dont you just do it manually and use __declspec(dllexport) ?

for example:

//Use this below assuming you are using C++
extern "C" {
__declspec(dllexport) int Add(int a, int b);
};

__declspec(dllexport) int Add(int a, int b)
{
return a + b;
}

I always found that doing it manually gives you more control + you can easily create macros to do all of this for you.


-Nate S.
"Always forgive your enemies, nothing annoys them more.."
quasar3d
quasar3d
thanks, I will use this then instead.

My Site

Topic Locked

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

Sign in to reply to this topic.