Skip navigation.
Home
The QNX Community Portal

View topic - trouble with linking boost

trouble with linking boost

Discussion about the QNX6 OS.

trouble with linking boost

Postby rafae11@yahoo.com » Wed Jul 24, 2013 9:53 am

Hi

i downloaded boost and saved it on virtual box
i ran the command tar -xvf boost_1_53_0.tar it extracted the files.
i typed ./bootstrap.sh and afterwards ./b2

...failed updating 14 targets...
...skipped 22 targets...
...updated 828 targets...

i copied all the built files over to windows directory.
C:/boost/boost_1_53_0

on momentics ide i added
in the compiler
Code: Select all
C:/boost/boost_1_53_0

in the linker -> extra library paths
Code: Select all
C:/boost/boost_1_53_0/stage/lib

linker -> extra libraries
Code: Select all
boost_filesystem
boost_system


linker -> extra object files
Code: Select all
C:/boost/boost_1_53_0/stage/lib/libboost_filesystem.so
C:/boost/boost_1_53_0/stage/lib/libboost_system.so

the project builds fine but when i run it i get the message

ldd:FATAL: Could not load library C:/boost/boost_1_53_0/stage/lib/libboost_filesystem.so

what am i missing?

Thanks
rafae11@yahoo.com
New Member
 
Posts: 6
Joined: Mon Jul 01, 2013 1:40 pm

Re: trouble with linking boost

Postby maschoen » Wed Jul 24, 2013 5:50 pm

Just a guess here.

By any chance did you create a "local" project.
That might explain the program's looking for a shared object on a Windows File system.

Also, are you trying to run this on a QNX target, or locally?
maschoen
QNX Master
 
Posts: 2640
Joined: Wed Jun 25, 2003 5:18 pm

Re: trouble with linking boost

Postby rafae11@yahoo.com » Wed Jul 24, 2013 9:40 pm

i don't know how to build in windows.
i tried to build in windows with visual studio command prompt but it doesn't support toolset=qcc.
i tried to build it on the QNX target running in virtual box and it worked.

i am trying to run it on the QNX target.
i have a copy of the built files in /lib folder.
i also checked LB_LIBRARY_PATH it has the path to the /lib folder
rafae11@yahoo.com
New Member
 
Posts: 6
Joined: Mon Jul 01, 2013 1:40 pm

Re: trouble with linking boost

Postby Tim » Thu Jul 25, 2013 4:04 pm

This

C:/boost/boost_1_53_0/stage/lib/libboost_filesystem.so

is not a QNX file path it's a Windows one.

I bet you configured the boost project under Windows and could not get it to compile (as you said happened) and then you copied it directly to QNX and built there. But you probably didn't reconfigure for QNX so the paths remain set for Windows compilation/running.

Just fix the LB_LIBRARY_PATH so it points where libboost_filesystem.so is located on your target machine (pwd will give you the full path when you are in the folder where libboost_filesystem.so is located).

Tim
Tim
Senior Member
 
Posts: 1388
Joined: Wed Mar 10, 2004 12:28 am

Re: trouble with linking boost

Postby rafae11@yahoo.com » Fri Jul 26, 2013 8:13 am

my set was fine apart from
choosing the option dynamic instead of static in extra libraries.
rafae11@yahoo.com
New Member
 
Posts: 6
Joined: Mon Jul 01, 2013 1:40 pm


Return to QNX6 - OS

Who is online

Users browsing this forum: No registered users and 1 guest

cron