PDA

View Full Version : adding boost library to Qt



neutrino
6th August 2011, 18:10
Can anyone help me to link boost library with Qt.
I am a newbie, so please tell from scratch.
Basically i want to use the graph library in boost to create a GUI frontend for basic graph operations.

Dong Back Kim
6th August 2011, 19:30
Can anyone help me to link boost library with Qt.
I am a newbie, so please tell from scratch.
Basically i want to use the graph library in boost to create a GUI frontend for basic graph operations.

Hi there,

BOOST is absolutely independent from the framework you are using. For example, as you may already know, it can be used with VC++ or gcc. I found it's absolutely easy and straightforward to link it with them. Qt isn't different. I think using boost with Qt is even simpler in a way. If you can specify OS and IDE then I might be more helpful.

Regards,

neutrino
7th August 2011, 06:26
OS: Ubuntu 10.10 x64
IDE: Qt Creator
Compiler: gcc 4.4.5

Dong Back Kim
7th August 2011, 06:36
OS: Ubuntu 10.10 x64
IDE: Qt Creator
Compiler: gcc 4.4.5

Sorry I haven't had a chance to use Qt Creator. I use Visual Studio 2010 or VIM with makefile. However, as you know, boost is really a set of header files so as long as you can include the header files somehow with your development environment it should just be working fine. I think that's the beauty of boost. Hope you figure out without too much trouble.

Regards,

neutrino
7th August 2011, 07:07
Can you tell me how to install boost in ubuntu

Lykurg
7th August 2011, 08:20
Hi, have a look at http://tinyurl.com/3q3albb

And Boost is a normal library so just tell the compiler where to find the header files. See the LIBS variable of qmake.

Dong Back Kim
7th August 2011, 08:39
Can you tell me how to install boost in ubuntu

Sure.


sudo apt-get install libboost-dev

neutrino
7th August 2011, 08:53
I have the 1.46.1 version of the boost.
my internet speed is very slow so i don't want to download those things again.
when i try to install it with this command:


chmod +x bootstrap.sh
./bootstrap.sh

it gives the following error:


./bootstrap.sh: 210: ./tools/build/v2/engine/src/build.sh: Permission denied
Building Boost.Jam with toolset ...
Failed to build Boost.Jam
Consult 'bootstrap.log' for more details

yeye_olive
7th August 2011, 09:09
At some point the installation process will need administrative rights. The instructions that come with boost should explain when you must run something as root.

Dong Back Kim
7th August 2011, 09:43
I have the 1.46.1 version of the boost.
my internet speed is very slow so i don't want to download those things again.
when i try to install it with this command:



it gives the following error:

hmmm I thought you don't need to bother manual installation process especially when you've downloaded the package by using apt-get.

neutrino
7th August 2011, 11:08
At some point the installation process will need administrative rights. The instructions that come with boost should explain when you must run something as root.

using the sudo command didn't help.
same error again

wysota
7th August 2011, 11:44
Try:
chmod a+x tools/build/v2/engine/src/build.sh

Or even:
find . -name "*.sh" -exec chmod a+x "{}" \;

and then run the build again.

neutrino
7th August 2011, 13:56
Try:
chmod a+x tools/build/v2/engine/src/build.sh

Or even:
find . -name "*.sh" -exec chmod a+x "{}" \;

and then run the build again.


I tried both of them
it showed that it had installed with some packages not installed.
I tried to check it with a simple program, but it couldn't be compiled as it showed that the headers couldn't be found.

neutrino
7th August 2011, 15:59
finally it installed.
thanks everyone for the help.