Sign in to follow this  
VitaliBR

Boost + Qt Creator

Recommended Posts

I'm using Qt Creator, and must include a boost in my project, how do I set the boost in qt creator?!


I am using the following functions:
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
#include <boost/progress.hpp>

Share this post


Link to post
Share on other sites
And what is the problem? Have you already compiled boost? Do you get any compiler or link errors?

If boost headers cannot be found add
INCLUDEPATH += path/to/boost
to the project file.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kambiz
And what is the problem? Have you already compiled boost? Do you get any compiler or link errors?

If boost headers cannot be found add
INCLUDEPATH += path/to/boost
to the project file.


I have compiled a boost on my computer using Visual Studio 2010, but how do I link the libs and includes the Qt Creator? I do not need to recompile boost using MinGW of Qt?

Sorry my poor english :(

Share this post


Link to post
Share on other sites
Quote:
Original post by VitaliBR
I have compiled a boost on my computer using Visual Studio 2010, but how do I link the libs and includes the Qt Creator? I do not need to recompile boost using MinGW of Qt?


If you have Visual Studio, then you probably want to use it with the Qt plugin, rather than QtCreator. In that case, you'd need to compile Qt with Visual Studio. This blog post describes the procedure.

Share this post


Link to post
Share on other sites
In addition to INCLUDEPATH you need to add
LIBS += -L"path/to/boost/libs"
to the project file, and add libraries using the -l option to the same line.
I have never tries using libs compiled by VC with MinGW, it might well be that you need to recompile boost with MinGW.

Share this post


Link to post
Share on other sites
Quote:
Original post by Emergent
Quote:
Original post by VitaliBR
I have compiled a boost on my computer using Visual Studio 2010, but how do I link the libs and includes the Qt Creator? I do not need to recompile boost using MinGW of Qt?


If you have Visual Studio, then you probably want to use it with the Qt plugin, rather than QtCreator. In that case, you'd need to compile Qt with Visual Studio. This blog post describes the procedure.


The Qt 4.6 don't support VS2010 :(

Share this post


Link to post
Share on other sites
Quote:
Original post by Emergent
Quote:
Original post by VitaliBR
I have compiled a boost on my computer using Visual Studio 2010, but how do I link the libs and includes the Qt Creator? I do not need to recompile boost using MinGW of Qt?


If you have Visual Studio, then you probably want to use it with the Qt plugin, rather than QtCreator.


I guess QtCreator is well enough suited for Qt development. The plugins and the external editors are basically stripped down versions of QtCreator. Or vice versa, QtCreator is the sum of plugins and editor.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this