Poco linking issue

Hi!

I’m trying to compile the ofxAssimpExample found in the latest version of OF but have failed so far due to linking issues related to Poco:

[tt]
Undefined symbols:
“std::basic_ostream<char, std::char_traits >& std::__ostream_insert<char, std::char_traits >(std::basic_ostream<char, std::char_traits >&, char const*, int)”, referenced from:
Poco::Net::HTTPClientSession::proxyAuthenticateImpl(Poco::Net::HTTPRequest&)in PocoNet.a(HTTPClientSession.o)
Poco::Net::HTTPClientSession::proxyAuthenticateImpl(Poco::Net::HTTPRequest&)in PocoNet.a(HTTPClientSession.o)
Poco::Net::HTTPRequest::write(std::basic_ostream<char, std::char_traits >&) constin PocoNet.a(HTTPRequest.o)
Poco::Net::HTTPRequest::write(std::basic_ostream<char, std::char_traits >&) constin PocoNet.a(HTTPRequest.o)
Poco::Net::HTTPRequest::write(std::basic_ostream<char, std::char_traits >&) constin PocoNet.a(HTTPRequest.o)
Poco::Net::MessageHeader::write(std::basic_ostream<char, std::char_traits >&) constin PocoNet.a(MessageHeader.o)
Poco::Net::MessageHeader::write(std::basic_ostream<char, std::char_traits >&) constin PocoNet.a(MessageHeader.o)
Poco::Net::HTTPResponse::write(std::basic_ostream<char, std::char_traits >&) constin PocoNet.a(HTTPResponse.o)
Poco::Net::HTTPResponse::write(std::basic_ostream<char, std::char_traits >&) constin PocoNet.a(HTTPResponse.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status[/tt]

I’m on OSX 10.5.8 and I use XCode 3. I somehow tried to change the order of inclusion for the librairies (as it has been proposed for Linux) but it does not work either.

Any idea ?

Tony

I finally made it work.

Basically, I installed Poco using MacPorts and then changed the CoreOF.xcconfig file as follows:

[tt]//LIB_POCONET = “$(OF_PATH)/libs/poco/lib/osx/PocoNet.a”
//LIB_POCOUTIL = “$(OF_PATH)/libs/poco/lib/osx/PocoUtil.a”
//LIB_POCOXML = “$(OF_PATH)/libs/poco/lib/osx/PocoXML.a”
//LIB_POCOFOUNDATION = “$(OF_PATH)/libs/poco/lib/osx/PocoFoundation.a”
LIB_POCONET = “/opt/local/lib/libPocoNet.dylib”
LIB_POCOUTIL = “/opt/local/lib/libPocoUtil.dylib”
LIB_POCOXML = “/opt/local/lib/libPocoXML.dylib”
LIB_POCOFOUNDATION = “/opt/local/lib/libPocoFoundation.dylib”[/tt]

I assume the version of Poco that is provided in the latest version of OF is not compatible with older versions of osx.

Thank you for the info. I too am trying to use XCode 3 and Mac OS 10.5.8, but when I run anything in openFrameworks0070 I get the same error you saw. I’m a novice at this, so I could use a little more direction to how you solved it. Could you please explain your process in more detail?

this is interesting – it looks like poco needs to be recompiled for 10.5 compatibility?

i just added an issue to github: https://github.com/openframeworks/openFrameworks/issues/692

i posted the solution to this somewhere in the forum but cannot find it right now, it just needs to recompile poco passing some flags, there’s even an issue report:

https://github.com/openframeworks/openFrameworks/issues/387

will repost the solution in the issue

well we usually only support latest two OS X releases.
easy fix would be to swap out the 007 libs with 0062 ones.
or we make a 10.5 007 release.

With Lion out though I feel like we should focus more on making our SDK non 10.6 dependent.

Theo, I understand about focusing your attention forward instead of backward.

Kyle, I tried using your Kinect workshop files in 0062, but I had lots more errors. Guess I’ll have to use a newer machine if I want to play with the Kinect.

Arturo, was this the post you were mentioning? http://forum.openframeworks.cc/t/poco-error-compiling-httputils/5898/0

Thanks everyone.

hi guys - having this same trouble with poco errors, as i’m trying to compile for 10.5 on a 10.6 OSX machine using 007… :stuck_out_tongue:

i’ve just tried fixing this by installing and configuring 007 with a new Poco (MacPorts) install as per Tony’s excellent suggestion above - i then changed the CoreOF.xcconfig file as per Tony’s example as well.

now i’m getting the below slew of errors on all compiles against the 10.5 SDK and target - any ideas what i did wrong? or is there something i’m now missing in the target / compiler config?

(for now i’m going back to removing all the image.load() calls in the code, as when using the original “libs/poco/lib/osx/PocoUtil.a” that’s all that seems to break it in what i’ve written so far…)

Undefined symbols for architecture i386:
“Poco::SystemException::SystemException(Poco::SystemException const&)”, referenced from:
ofURLFileLoader::ofURLFileLoader()in openFrameworksDebug.a(ofURLFileLoader.o)
“Poco::File::operator=(Poco::File const&)”, referenced from:
ofFile::close() in openFrameworksDebug.a(ofFileUtils.o)
ofFile::open(std::basic_string<char, std::char_traits, std::allocator >, ofFile::Mode, bool)in openFrameworksDebug.a(ofFileUtils.o)
“Poco::URI::URI(std::basic_string<char, std::char_traits, std::allocator > const&)”, referenced from:
ofURLFileLoader::handleRequest(ofHttpRequest) in openFrameworksDebug.a(ofURLFileLoader.o)
“Poco::FastMutex::~FastMutex()”, referenced from:
Poco::AbstractEvent<guiCallbackData, Poco::FIFOStrategy<guiCallbackData, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > >, Poco::AbstractDelegate, Poco::FastMutex>::~AbstractEvent()in guiBaseObject.o
Poco::AbstractEvent<guiCallbackData, Poco::FIFOStrategy<guiCallbackData, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > >, Poco::AbstractDelegate, Poco::FastMutex>::~AbstractEvent()in guiBaseObject.o
Poco::AbstractEvent<ofEventArgs, Poco::FIFOStrategy<ofEventArgs, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > >, Poco::AbstractDelegate, Poco::FastMutex>::~AbstractEvent()in openFrameworksDebug.a(ofEvents.o)
Poco::AbstractEvent<ofEventArgs, Poco::FIFOStrategy<ofEventArgs, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > >, Poco::AbstractDelegate, Poco::FastMutex>::~AbstractEvent()in openFrameworksDebug.a(ofEvents.o)
Poco::AbstractEvent<ofResizeEventArgs, Poco::FIFOStrategy<ofResizeEventArgs, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > >, Poco::AbstractDelegate, Poco::FastMutex>::~AbstractEvent()in openFrameworksDebug.a(ofEvents.o)
Poco::AbstractEvent<ofResizeEventArgs, Poco::FIFOStrategy<ofResizeEventArgs, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > >, Poco::AbstractDelegate, Poco::FastMutex>::~AbstractEvent()in openFrameworksDebug.a(ofEvents.o)
Poco::AbstractEvent<ofKeyEventArgs, Poco::FIFOStrategy<ofKeyEventArgs, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > >, Poco::AbstractDelegate, Poco::FastMutex>::~AbstractEvent()in openFrameworksDebug.a(ofEvents.o)

“Poco::AtomicCounter::~AtomicCounter()”, referenced from:
Poco::SharedPtr<Poco::FIFOStrategy<guiCallbackData, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > >, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::FIFOStrategy<guiCallbackData, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > > > >::release()in guiBaseObject.o
Poco::SharedPtr<Poco::FIFOStrategy<ofEventArgs, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > >, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::FIFOStrategy<ofEventArgs, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > > > >::release()in openFrameworksDebug.a(ofEvents.o)
Poco::SharedPtr<Poco::FIFOStrategy<ofResizeEventArgs, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > >, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::FIFOStrategy<ofResizeEventArgs, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > > > >::release()in openFrameworksDebug.a(ofEvents.o)
Poco::SharedPtr<Poco::FIFOStrategy<ofKeyEventArgs, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > >, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::FIFOStrategy<ofKeyEventArgs, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > > > >::release()in openFrameworksDebug.a(ofEvents.o)
Poco::SharedPtr<Poco::FIFOStrategy<ofMouseEventArgs, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > >, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::FIFOStrategy<ofMouseEventArgs, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > > > >::release()in openFrameworksDebug.a(ofEvents.o)
Poco::SharedPtr<Poco::FIFOStrategy<ofAudioEventArgs, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > >, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::FIFOStrategy<ofAudioEventArgs, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > > > >::release()in openFrameworksDebug.a(ofEvents.o)
Poco::SharedPtr<Poco::FIFOStrategy<ofTouchEventArgs, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > >, Poco::ReferenceCounter, Poco::ReleasePolicy<Poco::FIFOStrategy<ofTouchEventArgs, Poco::AbstractDelegate, Poco::p_less<Poco::AbstractDelegate > > > >::release()in openFrameworksDebug.a(ofEvents.o)

(it continues…)

Hi,

@toni:: can you post the libraries from your poco compilation for osx 10.5 ?
that would be great, i am having a difficult time to do that (i am on 10.6).
thank you.

Hi,
i am still trapped on this problem to get 10.5 app made with OF 007 on a Snow Leopard Mac.

@theo: i tried to swap poco library 007 with the 0062 but got other bunch of errors…
@jamie: could you solve your issue? it seems we are having the same problem.

It is perhaps due to some version of the libstdc++ we are using… some possible solution that i could not make work is referenced here:
http://www.linuxquestions.org/questions/programming-9/compile-error-undefined-reference-to-std-basic-ostream-669541/

best,

miguel.