Changing my engine from a .dll to an .exe

Started by
0 comments, last by gommo 20 years, 3 months ago
I have my engine as a dll (hooge.dll) and one renderer so far (hoogeD3D9.dll). I have a Test Application called TestApp.exe etc.. I''d like to change this around so my engine is the entry point and it basically loads up the testapp.dll as a plugin the same way it loads the directx renderer. No problem. However, Most of my classes currently in the hooge.dll are declared as such class HOOGE_API IRenderSystem { et.c.. where HOOGE_API = __declspec(dllexport) or __declspec(dllimport) depending on if HOOGE_API is declared. Pretty standard stuff. However, if I try change hooge.dll to an .exe, And remove the HOOGE_API from the classes, my DirectX dll doesnt compile due to incorrect dll usage. I''m stumped how to do this? Do I need to redesign everything? I guess my real question comes down to, if I have my interfaces in my .exe, how do I extend them from dll''s?
------------------------------------------------------
50% of me is a huge nerd! How about you?
Advertisement
I think that in the .exe, you would have to use __declspec(dllimport). Make sure that you''re using dllimport in the exe, and dllexport in the dll. Since you removed HOOGE_API from your classes, both the DLL and the EXE think that the classes are just local to the EXE, and so doesn''t work properly.
I know that''s not the answer to why it doesn''t compile, but removing HOOGE_API wasn''t the way to go.

This topic is closed to new replies.

Advertisement