Overview
Features
Download
Documentation
Community
Add-Ons & Services

STLPort and Poco (on Linux)

Please post support and help requests here.

STLPort and Poco (on Linux)

Postby james » 07 Jan 2009, 06:18

Hi folks,

I'm having a little difficulty getting Poco to live happily with STLPort 5

First I compiled the Poco libraries with the following changes to the SYSLIBS in the file poco-1.3.3p1/build/config/Linux

SYSLIBS = -lstlport -lpthread -ldl -lrt

The build succeeded and I can see with ldd that the shared libraries are pointing at STLPort

Code: Select all
ldd /usr/local/lib/libPocoFoundation.so
        libstlport.so.5.1 => /usr/local/lib/libstlport.so.5.1 (0x004cf000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00b01000)
        libdl.so.2 => /lib/libdl.so.2 (0x00b1a000)
        librt.so.1 => /lib/tls/librt.so.1 (0x00111000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x008e0000)
        libm.so.6 => /lib/tls/libm.so.6 (0x00e34000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00bb6000)
        libc.so.6 => /lib/tls/libc.so.6 (0x00125000)
        /lib/ld-linux.so.2 (0x00415000)


Then I compiled the following program

Code: Select all
#include "Poco/SharedPtr.h"
using namespace Poco;

int main (int argc, char *argv[])
{
    SharedPtr<int> test( new int );

    return 1;
}


g++ -Wall -g -I/usr/local/include/Poco -I/usr/local/include/stlport pocotest.cpp -lstlport -lPocoFoundation -o pocotest

But I get the following link errors...

Code: Select all
/tmp/cckNXSVh.o(.gnu.linkonce.t._ZN4Poco9MutexImpl10unlockImplEv+0x61): In function `Poco::MutexImpl::unlockImpl()':
/usr/local/include/Poco/Mutex_POSIX.h:102: undefined reference to `Poco::SystemException::SystemException(stlpmtx_std::basic_string<char, stlpmtx_std::char_traits<char>, stlpmtx_std::allocator<char> > const&, int)'
/tmp/cckNXSVh.o(.gnu.linkonce.t._ZN4Poco9MutexImpl8lockImplEv+0x61): In function `Poco::MutexImpl::lockImpl()':
/usr/local/include/Poco/Mutex_POSIX.h:82: undefined reference to `Poco::SystemException::SystemException(stlpmtx_std::basic_string<char, stlpmtx_std::char_traits<char>, stlpmtx_std::allocator<char> > const&, int)'
/tmp/cckNXSVh.o(.gnu.linkonce.t._ZN11stlpmtx_std12__node_alloc10deallocateEPvj+0x29): In function `stlpmtx_std::__node_alloc::deallocate(void*, unsigned int)':
/usr/local/include/stlport/stl/_alloc.h:209: undefined reference to `stlpmtx_std::__node_alloc::_M_deallocate(void*, unsigned int)'
/tmp/cckNXSVh.o(.gnu.linkonce.t._ZNK9stlp_priv12_String_baseIcN11stlpmtx_std9allocatorIcEEE21_M_throw_length_errorEv+0xf): In function `stlp_priv::_String_base<char, stlpmtx_std::allocator<char> >::_M_throw_length_error() const':
/usr/local/include/stlport/stl/_string.c:613: undefined reference to `stlpmtx_std::__stl_throw_length_error(char const*)'
/tmp/cckNXSVh.o(.gnu.linkonce.t._ZN11stlpmtx_std12__node_alloc8allocateERj+0x2d): In function `stlpmtx_std::__node_alloc::allocate(unsigned int&)':
/usr/local/include/stlport/stl/_alloc.h:206: undefined reference to `stlpmtx_std::__node_alloc::_M_allocate(unsigned int&)'
collect2: ld returned 1 exit status




Can anyone help?

thanks,

James
james
 
Posts: 1
Joined: 07 Jan 2009, 06:06

Return to Support

Who is online

Users browsing this forum: weloveapps and 2 guests

cron