Xcode 2.1: problem using C++-framework
Xcode 2.1: problem using C++-framework
- Subject: Xcode 2.1: problem using C++-framework
- From: Felix Franz <email@hidden>
- Date: Tue, 2 Aug 2005 11:47:16 +0200
Hi all,
we are currently porting our application to Tiger and the gcc4-compiler.
The application uses the Boost-C++-library (http://www.boost.org)
build as a
"Private Embedded Framework". We had no problems with this framework and
gcc3.3. We recompiled the Boost.framework using gcc4,
but the application crashes frequently in boost code.
A minimal example (using boost-signals) looks like:
--- main.cpp ---
#include <boost/signals.hpp>
#include <iostream>
bool slotCalled = false;
struct Slot
{
void operator()() const
{
slotCalled = true;
}
};
int main(int argc, char** argv) {
boost::signal<void ()> foo;
Slot slot;
foo.connect(slot);
foo();
if (slotCalled) {
std::cout << "slotCalled == true" << std::endl;
} else {
std::cout << "slotCalled == false" << std::endl;
}
return 0;
}
-----------------
if I create a new C++-Tool in Xcode with the file above referencing
our Boost-framework
the resulting program crashes with a SIGBUS in boost's signal code.
Building the program on the command-line using the following g++
invocation:
g++ main.cpp -F/Users/felix/Documents/Subversion/GuiDance/trunk/
Frameworks/Deployment -framework Boost
results in a working program! Do I have to change the Build-settings
in the Xcode project?
If so, how?
We assume that the error occurs because any_cast returns a null
pointer during comparing
type_info objects (see "bool operator()(const any& k1, const any& k2)
const" in named_slot_map.hpp).
Though the types are perfectly equal, the comparison returns false.
Thanks in advance,
felix
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden