Boost logo

Boost :

Subject: Re: [boost] [system] Problem with boost::system::system_category() under QNX Momentics
From: Piotr Orzechowski (piotrek.orzechowski_at_[hidden])
Date: 2014-12-31 06:31:30


Many thanks for the prompt reply,
> Hi Piotr,
>
> Am Mittwoch, 31. Dezember 2014, 08:31:53 schrieb Piotr Orzechowski:
>> At the beginning I must assure You that I've tried almost every solution
>> from similar topics , still they didn't solve my issue.
>>
>> I'm building binaries from Boost 1.57 using **MinGW**.
> This means host OS is Windows, right?

Yes.
>
>> Boost libraries I'm using: *thread* and *system* build without any errors.
>>
>> I was trying:
>> > toolset=gcc --target-os=qnxnto and toolset=gcc --target-os=qnx, both
> To many "--" error here. That should either be
>
> toolset=gcc target-os=qnxnto or toolset=gcc target-os=qnx

Syntax from bjam (also tried it)
>
>> didn't work.
> What exactly did not work? Please provide more information.

I followed most advices found on stackoverflow and some other sites.
They all were focusing on including libraries, correct libraries oders
>
>> I'm including correctly both libraries:
>> > -lboost_system-mgw48-mt-d-1_57 -lboost_thread-mgw48-mt-d-1_57
> For shared linking on windows, this is the wrong order.
I tried many orders with source file and libraries.
>> after using:
>> > `#define BOOST_SYSTEM_NO_DEPRECATED`
>>
>> I got rid of `boost::system::generic_category()` error, still I can't
> So this is deprecated API.
>
>> get rid of:
>> > boost::system::system_category()
> And this is new API.
>
>> I'm working in **QNX Momentics**.
>> I'm totally out of ideas, I'm really looking forward for any help I can
>> get.
> Hard to say more unless you show full error messages and commandlines.
Here they are:

C:/QNX650/host/win32/x86/usr/bin/qcc -Vgcc_ntox86 -lang-c++
-lang-c++ -oF:/xxx/trunk/QNX/MetroTests/prof/x86/o-g/prof_g
ProcessProfilesThread.o PConfig.o LanComClass.o PSynch.o
PThird.o Pmath.o Pmode.o PTests.o report.o -L . -L
F:/xxx/trunk/QNX/libYYY/Debug -L F:/xxx/trunk/QNX/libClassix/Debug -L
F:/xxx/trunk/QNX/GLIB/x86/a-g -L C:/Boost/lib -L
C:/QNX650/target/qnx6/x86/lib -L C:/QNX650/target/qnx6/x86/usr/lib
-Wl,--rpath-link . -Wl,--rpath-link
F:/xxx/trunk/QNX/libZFProfiler9012/Debug -Wl,--rpath-link
F:/xxx/trunk/QNX/libClassix/Debug -Wl,--rpath-link
F:/xxx/trunk/QNX/GLIB/x86/a-g -Wl,--rpath-link C:/Boost/lib
-Wl,--rpath-link C:/QNX650/target/qnx6/x86/lib -Wl,--rpath-link
C:/QNX650/target/qnx6/x86/usr/lib -Bstatic -lClassix -lGLIB_g
-Bdynamic -lsocket -lm -Bstatic -llibYYY -Bdynamic
-lboost_thread-mgw48-mt-d-1_57 -lboost_system-mgw48-mt-d-1_57 -g
F:/xxx/trunk/QNX/libYYY/Debug\liblibYYY.a(zfxyz_protocol.o): In function
`boost::thread_exception::thread_exception(int, char const*)':
protocol.cpp:(.text._ZN5boost16thread_exceptionC2EiPKc[_ZN5boost16thread_exceptionC2EiPKc]+0x7):
undefined reference to `boost::system::system_category()'
cc: C:/QNX650/host/win32/x86/usr/bin/ntox86-ld caught signal 1

error without:
#define BOOST_SYSTEM_NO_DEPRECATED
with same cmd line:

F:/xxx/trunk/QNX/libZFProfiler9012/Debug\liblibYYY.a(protocol.o): In
function `__static_initialization_and_destruction_0':
C:\Boost\include\boost-1_57/boost/system/error_code.hpp:221: undefined
reference to `boost::system::generic_category()'
C:\Boost\include\boost-1_57/boost/system/error_code.hpp:222: undefined
reference to `boost::system::generic_category()'
C:\Boost\include\boost-1_57/boost/system/error_code.hpp:223: undefined
reference to `boost::system::system_category()'
F:/xxx/trunk/QNX/libZFProfiler9012/Debug\liblibYYY.a(protocol.o): In
function `thread_exception':
C:\Boost\include\boost-1_57/boost/thread/exceptions.hpp:51: undefined
reference to `boost::system::system_category()'
cc: C:/QNX650/host/win32/x86/usr/bin/ntox86-ld caught signal 1

I hope this will be satisfactory, if not I'm looking forward to provide
more data.
libYYY uses boost thread library functions, its a static lib compiling
without any errors.
Building boost libraries with for static use also didn't help.

Best Regards,
Piotr


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk