473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Base Classes in .exe, derived classes in .dll

Hi,

I'm hacking around coding a 3D Engine and I'm stumped with a concept.

Currently my engine is in a dll and it contains interfaces such as
IRenderSystem, IRenderDriver etc.. that are extended by other dll's
depending on the Rendering API. (Such as OpenGL or Directx)
The engine has main classes such as HoogeEngine, LogManager etc.. that are
used by client code to operate the engine.

The client app is in an .exe. It basically statically links the dll by
linking to the Hooge.lib file and then instantates the engine like this

//Create the engine
Hooge::HoogeEngine engine;

//Create the test task
TestApplicationTask task;

engine.registerApplicationTask(task);
engine.go();
And we are away. This is all working perfectly. HOWEVER, I now would like to
change the structure so that the Engine is an .exe and the game is just
another plugin such as the rendering dll's. However, I now have issues with
incorrect dll usage and all the __desclspec(dllexport) __declspec(dllimport)
associated with my interfaces.

At the moment, the Interfaces in the engine and most of all the classes in
the engine including the engine class itself (HoogeEngine), are prefixed
with HOOGE_API which
is defined as __declspec(dllexport) in the Hooge.dll, but defined as
__declspec(dllimport) if included in the client app (.exe) or the rendering
dll's (.dll's).
I can see why as my engine is a dll and it needs to export stuff out, which
is imported into the exe!

What do I need to change though to change the engine to an .exe?? and the
client app to a dll??

Do I remove all the HOOGE_API prefixes off the engine classes as they are
now in the .exe? How does the dll's such as the rendering API's and the
Application dll extend from the
interfaces defined in the exe??

I'm lost

Thanks
Jul 22 '05 #1
6 1925
On Wed, 21 Jan 2004 22:27:12 +1100, "Colin Goudie"
<go***@iinet.net.au> wrote in comp.lang.c++:
Hi,

I'm hacking around coding a 3D Engine and I'm stumped with a concept.

Currently my engine is in a dll and it contains interfaces such as
IRenderSystem, IRenderDriver etc.. that are extended by other dll's
depending on the Rendering API. (Such as OpenGL or Directx)
The engine has main classes such as HoogeEngine, LogManager etc.. that are
used by client code to operate the engine.


You need a Windows programming group like
news:comp.os.ms-windows.win32.programmer or one of Microsoft's support
groups in the news:microsoft.public.vc.* family. There is no such
thing as a DLL in the C++ language. This is a Microsoft non-standard
extension, and the language says nothing at all about how they work.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Jul 22 '05 #2

"Colin Goudie" <go***@iinet.net.au> wrote in message
news:40**********************@freenews.iinet.net.a u...
I can see why as my engine is a dll and it needs to export stuff out, which is imported into the exe!

on Windows you cannot export symbols from an executable.
You may only export symbols from a dll.
Jul 22 '05 #3
"Frank Puck" <ne***********@sbcglobal.net> wrote...

"Colin Goudie" <go***@iinet.net.au> wrote in message
news:40**********************@freenews.iinet.net.a u...
I can see why as my engine is a dll and it needs to export stuff out,

which
is imported into the exe!

on Windows you cannot export symbols from an executable.
You may only export symbols from a dll.


This statement is (a) incorrect and (b) off-topic.
Jul 22 '05 #4

"Frank Puck" <ne***********@sbcglobal.net> wrote in message news:b7****************@newssvr25.news.prodigy.com ...

on Windows you cannot export symbols from an executable.
You may only export symbols from a dll.

Not true.

Jul 22 '05 #5

"Ron Natalie" <ro*@sensor.com> wrote in message
news:40*********************@news.newshosting.com. ..

"Frank Puck" <ne***********@sbcglobal.net> wrote in message news:b7****************@newssvr25.news.prodigy.com ...

on Windows you cannot export symbols from an executable.
You may only export symbols from a dll.

Not true.

please enlighten me about how?
E.g. how can I link an DLL importing some symbols by specifying an EXE
exporting these symbols.
Maybe via email to avoid offending some people here (which do programming
without an underlying OS)...
Jul 22 '05 #6
"Frank Puck" <ne***********@sbcglobal.net> wrote...

"Ron Natalie" <ro*@sensor.com> wrote in message
news:40*********************@news.newshosting.com. ..

"Frank Puck" <ne***********@sbcglobal.net> wrote in message

news:b7****************@newssvr25.news.prodigy.com ...

on Windows you cannot export symbols from an executable.
You may only export symbols from a dll.

Not true.

please enlighten me about how?


Please post your Windows questions to a Windows newsgroup.
Jul 22 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Bryan Parkoff | last post by:
I find an interesting issue that one base class has only one copy for each derived class. It looks like that one base class will be copied into three base classes while derived class from base...
9
by: justanotherguy63 | last post by:
Hi, I am designing an application where to preserve the hierachy and for code substitability, I need to pass an array of derived class object in place of an array of base class object. Since I...
5
by: Nathan Bullock | last post by:
Hi, I have a base class, say Base and there are two classes, say Class1 and Class2 which are derived from Base. Is there any way for me, say from a static method in Base, to get a list of all...
5
by: Andy | last post by:
Hi all, I have a site with the following architecture: Common.Web.dll - Contains a CommonPageBase class which inherits System.Web.UI.Page myadd.dll - Contains PageBase which inherits...
5
by: Chris Szabo | last post by:
Good afternoon everyone. I'm running into a problem deserializing a stream using the XmlSerializer. A stored procedure returns the following from SQL Server: <Student StudentId="1" Status="1"...
26
by: nyathancha | last post by:
Hi, How Do I create an instance of a derived class from an instance of a base class, essentially wrapping up an existing base class with some additional functionality. The reason I need this is...
10
by: Dennis Jones | last post by:
Hello, I have a hierarchy of classes in which there will be a data element that is common to all descendant classes. This element (a string in this case) is constant, but specific to each...
15
by: Bob Johnson | last post by:
I have a base class that must have a member variable populated by, and only by, derived classes. It appears that if I declare the variable as "internal protected" then the base class *can*...
4
by: James Emil Avery | last post by:
Hi all, I have a problem where 1. I have many derived classes of a base class. 2. The base class has many functions implementing common behaviour. 3. The code should be the same for all the...
2
by: cmonthenet | last post by:
Hello, I searched for an answer to my question and found similar posts, but none that quite addressed the issue I am trying to resolve. Essentially, it seems like I need something like a virtual...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.