Boost and frameworks
Boost and frameworks
- Subject: Boost and frameworks
- From: Benjohn Barnes <email@hidden>
- Date: Fri, 7 Nov 2003 14:04:55 +0000 (GMT)
I am currently trying to get our reusable source code to be usable outside
of it's original build environment (CodeWarrior), and target API (a
Photoshop plugin). I would like to be able to build using xCode (because it
looks like a great way to use all Apple's lovely new technology), target
APIs other than Photoshop (iMovie, for instance), and also build standalone
products.
Being very bad at setting up build environments, I'm having a dreary time
with it, and generally getting very frustrated that I can't get on with
simply coding!
The first thing I really need to get working is Boost [1], a set of C++
libraries akin to the STL, which we use extensively.
Should I turn Boost in to a stand alone framework? It's pretty big, and a
pain to add to all projects that uses it. As a framework, can it carry about
a pre-compiled header so that any project making use of it has the PCH ready
for use?
Assuming that I do want to use it as a framework, do I create a framework
project, drag the whole of Boost in, and add the bits of Boost that we use
regularly to the project's prefix file? If I do this, is it possible to have
a single framework that potentially contains different PCHs for different
build styles (deployment, debug, etc).
When using Boost, my includes use the framework style:
#include <boost/shared_ptr.hpp>
If I simply add the Boost source and headers to a project, it leads to "file
not found" at each point where a Boost include is used. I _could_ change my
own source to not do this (and instead reference Boost's files directly),
but obviously there's a better way :) Also, as Boost internally uses
includes of the form: "#include <boost/bind/arg.hpp>", the approach is
really a non starter.
Thanks for any help! Boost's so deeply routed in our source that I can't
even use an ASSERT macro without it (because ASSERT throws an exception in
release code to give a handy warning, and the exception in question use a
boost::shared_ptr).
Cheers,
Benjohn
[1] If you've not some across Boost before, I cannot recommend strongly
enough that you take a look:
http://www.boost.org/libs/libraries.htm#Category
It's A collection of extremely high quality per reviewed libraries. They are
very well documented. They are extremely portable and are written in high
quality non obfuscated c++ with a clean coding style. The license allows
full commercial use without any hitches at all. As examples, the
boost::shared_ptr is the single most useful class I've ever come across in
c++: it makes inheritance work :) I pointed a friend at Boost a week or so
ago, and he believes that boost::graph (for networks) will probably save him
3 months of work.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.