473,806 Members | 2,707 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Lib depending on Lib, packaging for distro

I tryed to make my hobby project look a little more like the projects
at work. In theory I could find the answer by examining the stuff at
work, but they use alot of custom build scripts and 3rd party
software, which I won't have at home. My goal was to create a single
library to be distributed to developers for use. So, I created a
directory "Redist", which in turn contains a "Lib" and "Include"
directory. My problem is that my entire solution consists of many
libraries, for example "Core", "Audio", "GFX", "Common", etc. For
anyone to use my lib they need the includes of course. But how do you
create one lib and include out of many? Especially when they are in
some complicated directory hierarchy during development?

Lets say Core is dependant on: Commo.lib, Audio.lib, and GFX.lib. The
output of Core is MyEngine.lib and MyEngine.h, which includes all the
Core includes...

MyEngine.h would also somehow have to contain a copy of the contents
for all the headers of its dependencies, no? Do I need some fancy
third party software to parse all my headers and generate a master or
something? Is there an easier solution?

These are all static libs btw. I wanted to do Audio and the others as
a static lib so I can re-use them in other projects.

Oct 31 '07 #1
4 1701
"Christophe r" <cp***@austin.r r.comwrote in message
news:11******** **************@ e34g2000pro.goo glegroups.com.. .
>I tryed to make my hobby project look a little more like the projects
at work. In theory I could find the answer by examining the stuff at
work, but they use alot of custom build scripts and 3rd party
software, which I won't have at home. My goal was to create a single
library to be distributed to developers for use. So, I created a
directory "Redist", which in turn contains a "Lib" and "Include"
directory. My problem is that my entire solution consists of many
libraries, for example "Core", "Audio", "GFX", "Common", etc. For
anyone to use my lib they need the includes of course. But how do you
create one lib and include out of many? Especially when they are in
some complicated directory hierarchy during development?

Lets say Core is dependant on: Commo.lib, Audio.lib, and GFX.lib. The
output of Core is MyEngine.lib and MyEngine.h, which includes all the
Core includes...

MyEngine.h would also somehow have to contain a copy of the contents
for all the headers of its dependencies, no? Do I need some fancy
third party software to parse all my headers and generate a master or
something? Is there an easier solution?

These are all static libs btw. I wanted to do Audio and the others as
a static lib so I can re-use them in other projects.
Your header would only have to include the cotents of the headers that you
wanted to give the users direct access to. Your library would in effect
encapuslate the other libraries so that the end user should never need to
see or know about it's contents, including any headers. When your library
is compiled it uses the headers, but then gets compiled into a .lib with all
the information. The only thing you would need to include in your headers
is the calls to your library functions.
Oct 31 '07 #2
On Oct 31, 11:03 am, "Jim Langston" <tazmas...@rock etmail.comwrote :
"Christophe r" <cp...@austin.r r.comwrote in message

news:11******** **************@ e34g2000pro.goo glegroups.com.. .


I tryed to make my hobby project look a little more like the projects
at work. In theory I could find the answer by examining the stuff at
work, but they use alot of custom build scripts and 3rd party
software, which I won't have at home. My goal was to create a single
library to be distributed to developers for use. So, I created a
directory "Redist", which in turn contains a "Lib" and "Include"
directory. My problem is that my entire solution consists of many
libraries, for example "Core", "Audio", "GFX", "Common", etc. For
anyone to use my lib they need the includes of course. But how do you
create one lib and include out of many? Especially when they are in
some complicated directory hierarchy during development?
Lets say Core is dependant on: Commo.lib, Audio.lib, and GFX.lib. The
output of Core is MyEngine.lib and MyEngine.h, which includes all the
Core includes...
MyEngine.h would also somehow have to contain a copy of the contents
for all the headers of its dependencies, no? Do I need some fancy
third party software to parse all my headers and generate a master or
something? Is there an easier solution?
These are all static libs btw. I wanted to do Audio and the others as
a static lib so I can re-use them in other projects.

Your header would only have to include the cotents of the headers that you
wanted to give the users direct access to. Your library would in effect
encapuslate the other libraries so that the end user should never need to
see or know about it's contents, including any headers. When your library
is compiled it uses the headers, but then gets compiled into a .lib with all
the information. The only thing you would need to include in your headers
is the calls to your library functions.- Hide quoted text -

- Show quoted text -
Yea, that is the problem. The end user, or rather the developer, will
need the headers from the other libs, such as the Logger class in the
Common.lib, or the Audio Manager from the Audio.lib. So, I guess I
will have to write some program or batch file that copies the contents
of all those headers into a header for the main lib, yicky.

Let's verify, before I do all this work. Simplified example:

Project: Common.lib
Users: EngineX.lib, and user of EngineX.lib
Contents: Logger.h and Logger.cpp

Project: EngineX.lib
Users: user of EngineX.lib
Contents: MyClass, which uses Logger

Procedure: Build Common.lib,
Copy Logger.h to EngineX/Redist/Include
Build EngineX.lib, linking to Common.lib
Copy EngineX.h to EngineX/Redist/Include
Copy EngineX.lib to EngineX/Redist/Lib

Now the user can link thier project to EngineX.lib, and include
EngineX.h and Logger.h where needed.
Alternatively, I can also write some program or batch file to get
all .h files in EngineX/Redist/Include and insert #include<filena me>
in EngineX.h so they only have to include one file when using my lib.

Is that all correct?

Nov 1 '07 #3
"Christophe r" <cp***@austin.r r.comwrote in message
news:11******** **************@ q5g2000prf.goog legroups.com...
On Oct 31, 11:03 am, "Jim Langston" <tazmas...@rock etmail.comwrote :
>"Christopher " <cp...@austin.r r.comwrote in message

news:11******* *************** @e34g2000pro.go oglegroups.com. ..
>I tryed to make my hobby project look a little more like the projects
at work. In theory I could find the answer by examining the stuff at
work, but they use alot of custom build scripts and 3rd party
software, which I won't have at home. My goal was to create a single
library to be distributed to developers for use. So, I created a
directory "Redist", which in turn contains a "Lib" and "Include"
directory. My problem is that my entire solution consists of many
libraries, for example "Core", "Audio", "GFX", "Common", etc. For
anyone to use my lib they need the includes of course. But how do you
create one lib and include out of many? Especially when they are in
some complicated directory hierarchy during development?
Lets say Core is dependant on: Commo.lib, Audio.lib, and GFX.lib. The
output of Core is MyEngine.lib and MyEngine.h, which includes all the
Core includes...
MyEngine.h would also somehow have to contain a copy of the contents
for all the headers of its dependencies, no? Do I need some fancy
third party software to parse all my headers and generate a master or
something? Is there an easier solution?
These are all static libs btw. I wanted to do Audio and the others as
a static lib so I can re-use them in other projects.

Your header would only have to include the cotents of the headers that
you
wanted to give the users direct access to. Your library would in effect
encapuslate the other libraries so that the end user should never need to
see or know about it's contents, including any headers. When your
library
is compiled it uses the headers, but then gets compiled into a .lib with
all
the information. The only thing you would need to include in your
headers
is the calls to your library functions.- Hide quoted text -

- Show quoted text -

Yea, that is the problem. The end user, or rather the developer, will
need the headers from the other libs, such as the Logger class in the
Common.lib, or the Audio Manager from the Audio.lib. So, I guess I
will have to write some program or batch file that copies the contents
of all those headers into a header for the main lib, yicky.

Let's verify, before I do all this work. Simplified example:

Project: Common.lib
Users: EngineX.lib, and user of EngineX.lib
Contents: Logger.h and Logger.cpp

Project: EngineX.lib
Users: user of EngineX.lib
Contents: MyClass, which uses Logger

Procedure: Build Common.lib,
Copy Logger.h to EngineX/Redist/Include
Build EngineX.lib, linking to Common.lib
Copy EngineX.h to EngineX/Redist/Include
Copy EngineX.lib to EngineX/Redist/Lib

Now the user can link thier project to EngineX.lib, and include
EngineX.h and Logger.h where needed.
Alternatively, I can also write some program or batch file to get
all .h files in EngineX/Redist/Include and insert #include<filena me>
in EngineX.h so they only have to include one file when using my lib.

Is that all correct?
Without knowing exactly what you are trying to achieve, it is hard to say.
If you are simply trying to take all the libraries that can be used by the
end user and link them into one library, for no other reason then they now
only have to link against one library, I don't think this is a good idea.
It sounds like you are not encapsulating the calls, but doing something
else. The best approach for an engine, IMO, is to encapsulate the calls to
other libraries.

This is veering off course for staying on topic for C++ (if it ever was). I
think you would get some very good answers in comp.programmin g as this
actually extends to more than C and C++ but libraries in general.
Nov 1 '07 #4
On Nov 1, 4:59 pm, "Jim Langston" <tazmas...@rock etmail.comwrote :
"Christophe r" <cp...@austin.r r.comwrote in message

news:11******** **************@ q5g2000prf.goog legroups.com...


On Oct 31, 11:03 am, "Jim Langston" <tazmas...@rock etmail.comwrote :
"Christophe r" <cp...@austin.r r.comwrote in message
>news:11******* *************** @e34g2000pro.go oglegroups.com. ..
I tryed to make my hobby project look a little more like the projects
at work. In theory I could find the answer by examining the stuff at
work, but they use alot of custom build scripts and 3rd party
software, which I won't have at home. My goal was to create a single
library to be distributed to developers for use. So, I created a
directory "Redist", which in turn contains a "Lib" and "Include"
directory. My problem is that my entire solution consists of many
libraries, for example "Core", "Audio", "GFX", "Common", etc. For
anyone to use my lib they need the includes of course. But how do you
create one lib and include out of many? Especially when they are in
some complicated directory hierarchy during development?
Lets say Core is dependant on: Commo.lib, Audio.lib, and GFX.lib. The
output of Core is MyEngine.lib and MyEngine.h, which includes all the
Core includes...
MyEngine.h would also somehow have to contain a copy of the contents
for all the headers of its dependencies, no? Do I need some fancy
third party software to parse all my headers and generate a master or
something? Is there an easier solution?
These are all static libs btw. I wanted to do Audio and the others as
a static lib so I can re-use them in other projects.
Your header would only have to include the cotents of the headers that
you
wanted to give the users direct access to. Your library would in effect
encapuslate the other libraries so that the end user should never need to
see or know about it's contents, including any headers. When your
library
is compiled it uses the headers, but then gets compiled into a .lib with
all
the information. The only thing you would need to include in your
headers
is the calls to your library functions.- Hide quoted text -
- Show quoted text -
Yea, that is the problem. The end user, or rather the developer, will
need the headers from the other libs, such as the Logger class in the
Common.lib, or the Audio Manager from the Audio.lib. So, I guess I
will have to write some program or batch file that copies the contents
of all those headers into a header for the main lib, yicky.
Let's verify, before I do all this work. Simplified example:
Project: Common.lib
Users: EngineX.lib, and user of EngineX.lib
Contents: Logger.h and Logger.cpp
Project: EngineX.lib
Users: user of EngineX.lib
Contents: MyClass, which uses Logger
Procedure: Build Common.lib,
Copy Logger.h to EngineX/Redist/Include
Build EngineX.lib, linking to Common.lib
Copy EngineX.h to EngineX/Redist/Include
Copy EngineX.lib to EngineX/Redist/Lib
Now the user can link thier project to EngineX.lib, and include
EngineX.h and Logger.h where needed.
Alternatively, I can also write some program or batch file to get
all .h files in EngineX/Redist/Include and insert #include<filena me>
in EngineX.h so they only have to include one file when using my lib.
Is that all correct?

Without knowing exactly what you are trying to achieve, it is hard to say.
If you are simply trying to take all the libraries that can be used by the
end user and link them into one library, for no other reason then they now
only have to link against one library, I don't think this is a good idea.
It sounds like you are not encapsulating the calls, but doing something
else. The best approach for an engine, IMO, is to encapsulate the calls to
other libraries.

This is veering off course for staying on topic for C++ (if it ever was). I
think you would get some very good answers in comp.programmin g as this
actually extends to more than C and C++ but libraries in general.- Hide quoted text -

- Show quoted text -
Agreed. Thanks.

Nov 1 '07 #5

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

Similar topics

8
2196
by: Ron Stephens | last post by:
Can anyone give me a brief comparison of the purposes of these two projects (AnyGUI and pyGUI)? In other words, how are the motivations and goals for each project different? Ron Stephens
0
1278
by: Thomas W | last post by:
Will there be a WSGI-server like BaseHTTPServer etc in the standard distro? I think that would increase the adoptation of the WSGI-standard. A new web-framework for python pops up every other week and more and more support WSGI. Why not focus on getting an optimized, production-grade fully documented WSGI-server into the distro? Right now the BaseHTTPServer seems to be usable for development and testing, not production environment. Perhaps...
0
5207
by: blkwebman | last post by:
I'm trying to create a "standalone" install package (without any of the dialog boxes that a standard setup package would have). I think I understand how to do it in VB6 (using PDCmdLn.exe); I have already researched this subject in the MSDN for VB6. Here is the problem: I'm trying to execute a batch file containing this command and I'm running into a couple of errors. Here is the contents of the batch file: ...
10
2825
by: azrael | last post by:
Hy guys last night i was lying in my bed and thinking about something. is there any linux distro that is primary oriented to python. you know what i mean. no need for php, java, or something like this. pure python and containig all the funky modules like scipy, numpy, boaconstructor (wx of course). something like the python enthought edition, but all this on a distro included. maybe psql but persistant predered, zope of course....
15
2968
by: John Nagle | last post by:
I've been installing Python and its supporting packages on a dedicated server with Fedora Core 6 for about a day now. This is a standard dedicated rackmount server in a colocation facility, controlled via Plesk control panel, and turned over to me with Fedora Core 6 in an empty state. This is the standard way you get a server in a colo today. Bringing Python up in this completely clean environment is a huge hassle, and it doesn't...
5
1159
by: farksimmons | last post by:
I am creating a distro of Python to be licensed as GPL.... am wondering, what would anyone suggest as to 3rd party modules being put into it (non-commercial of course!)? I know I'd put MySQLdb into it at the very least. Any suggestions? Thanks, Fark Simmons
4
2437
by: Mr Seth T | last post by:
Hey, I have spent several days trying to find out how to do something, and i don't know if I am blind or what, but I can not find it. I am developing a web app and I need it to run an activex control. I have developed the control and it runs great on my development system (VS2005, C#, IE6, Win2000Pro, output is a DLL) because as far as I can tell, the IDE registers the DLL. The problem is packaging it so it registers itself on any...
5
1664
by: Paul Rubin | last post by:
I've been through this kind of thing a few times in the past and received excellent advice here on clpy about how to deal with specific technical aspects (e.g. how to use setuptools, InnoSetup, etc). I'm now wondering where this type of thing is best addressed in more general terms. What I usually see happening, in projects I've worked on and in others, is that developers get the code working on their own computers, using source control...
8
2125
arunmib
by: arunmib | last post by:
Hi all, I have a unique problem...I don't know which distro to choose from? I have tried the following, Redhat first, Since I was a kid in computers at that time, got vexed and dropped it. Used Suse for some time in official works. Used versions 9.3 and then 10.2 for some time on my personal laptop. Experimented with Debian version 3 and 4. Liked this very much Finally tried Freespire and live CD of Ubuntu.... Now, I m totally...
6
7544
AmberJain
by: AmberJain | last post by:
Hello, I'm posting this thread here as a thread in Windows forum has taken a turn and is now going on the Linux path. The thread can be found here. Now the description of actual problem......... I need a Linux distro for USB drives (also called Pendrives). The Linux distro must have GUI (Graphical User Interface). The linux distro must support installation of VMware Player also (A light weight distro is preferred). i.e. I need a GUI...
0
9719
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10624
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10371
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10111
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7650
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5684
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4330
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3853
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.