DLL Files?
I know this isn''t directly OpenGL related, but I''m trying to write a particle engine-based game using a DLL file I wrote for the main particle functions. I''m using __declspec(dllexport) and import to make the functions availible, but I can''t figure out how to actually include the DLL file in my main .CPP file... any help would be appreciated.
Pathos
Ok. When you compile a DLL, you have a .lib file, which you need to link to your app. Then, to call your functions, you have to include your header (.h) which contains _declspec(dllimport) declarations of your functions.
I can be more precise if you want to.
EL
----------------------------------------
"Inash neteia haeg joa kavari quilm..." SD4
I can be more precise if you want to.
EL
----------------------------------------
"Inash neteia haeg joa kavari quilm..." SD4
----------------------------------------"Inash neteia haeg joa kavari quilm..." SD4
I think clarification would help. I''m not completly clear on what exactly I should do. Thanks for the help.
All right. I'll give you some source code :-)
MYDLL.CPP is your DLL, which you compile with MYDLL_EXPORTS defined. You can then use your DLL in MYPROJECT.CPP, which you compile without MYDLL_EXPORTS. When you build your DLL, you'll have the .dll and a .lib, which you link to your project (MYPROJECT.CPP).
I typed everything from memory, so there might be some errors. Read the example, and figure out what I did. It's easy.
EL
(Edition: I added /**/ at the end of many lines to keep some formatting. The message board has some problems with #defines and other commands)
(2nd Edition: It didn't worked
. Oh well, you are smart enough to figure it out :p)
----------------------------------------
"Inash neteia haeg joa kavari quilm..." SD4
Edited by - Demon Lord on July 27, 2000 8:11:14 PM
Edited by - Demon Lord on July 27, 2000 8:12:55 PM
|
MYDLL.CPP is your DLL, which you compile with MYDLL_EXPORTS defined. You can then use your DLL in MYPROJECT.CPP, which you compile without MYDLL_EXPORTS. When you build your DLL, you'll have the .dll and a .lib, which you link to your project (MYPROJECT.CPP).
I typed everything from memory, so there might be some errors. Read the example, and figure out what I did. It's easy.
EL
(Edition: I added /**/ at the end of many lines to keep some formatting. The message board has some problems with #defines and other commands)
(2nd Edition: It didn't worked
![](sad.gif)
----------------------------------------
"Inash neteia haeg joa kavari quilm..." SD4
Edited by - Demon Lord on July 27, 2000 8:11:14 PM
Edited by - Demon Lord on July 27, 2000 8:12:55 PM
----------------------------------------"Inash neteia haeg joa kavari quilm..." SD4
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement