Constructing an Interface DLL
I have a DLL (Static LIB) for the Graphics Core, the Audio Core, and the Input Core of a project I am woking on. I want to know how I can just make one DLL called Engine.dll that encompasses all of my core components so that instead of me having to link to Graphics.dll and Audio.dll and etc, I can just link to the engine dll.
So I include the right header files in the Engine DLL project and link to the libraries I want, and I want them to all meld into my one engine dll. Is this even possible. When I try to do it I keep getting these errors:
AREngine warning LNK4001: no object files specified; libraries used
AREngine error LNK2001: unresolved external symbol __DllMainCRTStartup@12
AREngine fatal error LNK1120: 1 unresolved externals
Can anyone give me any advice? Thanks!
"Love all, trust a few. Do wrong to none." - Shakespeare
Dirge - Aurelio Reis
www.CodeFortress.com
Current Causes:
Nissan sues Nissan
Can''t you just pull ALL the source for Graphcs, Audio,
and Input Core into the Engine.dll and build it?
Kami no Itte ga ore ni zettai naru!
and Input Core into the Engine.dll and build it?
Kami no Itte ga ore ni zettai naru!
do you have a module that defines DllMain? make one and be sure to compile it for dll (check project settings).
---
Come to #directxdev IRC channel on AfterNET
---
Come to #directxdev IRC channel on AfterNET
I defined DLLMain() in the header for the Engine dll (Engine.h) but with nothing in it. Nothing changed. What information would I need to put in it? Is that the problem, since the engine DLL project is pretty much empty except for engine.h and the library includes (I just wanted it to be a go between)?
I might just have it all in one file (the engine dll), but the problem is that every component is a module (a seperate class). The solution I suppose might even be to have the engine itself be a class with containted objects representing the engine components:
class CEngine
{
CGraphicsCore m_Graphics;
CAudioCore m_Audio;
};
or maybe even this
class CEngine : public CGraphicsCore, public CAudioCore
{};
The thing though is that I want every module to be created locally in the program that uses the components (so I can use another input mananager if I wanted to). I just want to avoid the hassle of having to do this:
Engine->Graphics->Renderer->ClearScreen();
It''s too much. Maybe I''ll have to though, thanks for your help so far guys.
"Love all, trust a few. Do wrong to none." - Shakespeare
Dirge - Aurelio Reis
www.CodeFortress.com
Current Causes:
Nissan sues Nissan
I might just have it all in one file (the engine dll), but the problem is that every component is a module (a seperate class). The solution I suppose might even be to have the engine itself be a class with containted objects representing the engine components:
class CEngine
{
CGraphicsCore m_Graphics;
CAudioCore m_Audio;
};
or maybe even this
class CEngine : public CGraphicsCore, public CAudioCore
{};
The thing though is that I want every module to be created locally in the program that uses the components (so I can use another input mananager if I wanted to). I just want to avoid the hassle of having to do this:
Engine->Graphics->Renderer->ClearScreen();
It''s too much. Maybe I''ll have to though, thanks for your help so far guys.
"Love all, trust a few. Do wrong to none." - Shakespeare
Dirge - Aurelio Reis
www.CodeFortress.com
Current Causes:
Nissan sues Nissan
inline bool Engine::ClearScreen(){ return(Graphics->Render->ClearScreen());}//then just call thisEngine->ClearScreen();
I use something similar to this in mine. If you have to go this route, it cuts down on typing, but is definetly a messy way to do it.
[edited by - ze_jackal on July 27, 2002 8:53:11 PM]
I did something similar (and I now I''m a freak) but I don''t like the extra overhead. You are really calling two functions right there, which sucks, especially since you have to do it every frame. So you get a little extra overhead when you have to do it for the clear, swap buffers, begin and end scene calls, among others. I''d rather avoid this.
"Love all, trust a few. Do wrong to none." - Shakespeare
Dirge - Aurelio Reis
www.CodeFortress.com
Current Causes:
Nissan sues Nissan
"Love all, trust a few. Do wrong to none." - Shakespeare
Dirge - Aurelio Reis
www.CodeFortress.com
Current Causes:
Nissan sues Nissan
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement