与Qt创建者和Linux提振 [英] Boost with Qt Creator and Linux

查看:118
本文介绍了与Qt创建者和Linux提振的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

于是我又说:

LIBS += 
       -lboost_system\                                                         
       -lboost_gregorian

要我的项目的.pro,但造物主它说:找不到-lboost_system。我试图用UNCLUDEPATH,但打破了路径的所有库。

To my projects .pro, but in Creator it says "cannot find -lboost_system". I tried using "UNCLUDEPATH" but that broke the path for all libraries.

任何人有任何想法如何使用boost ::公历与Qt Creator的?

Anyone have any ideas how to use boost::gregorian with Qt Creator?

编辑:下面的工作得到它的认可,但打破了所有其他库

Below works to get it recognized, but breaks all other libraries.

INCLUDEPATH + = / usr / include目录结果
LIBS + = -L/ usr / include目录/升压-lboost_system -lboost_gregorian

INCLUDEPATH += /usr/include
LIBS += -L"/usr/include/boost" -lboost_system -lboost_gregorian

推荐答案

我只是我自己尝试过,这是工作,这是我的第一个Qt和提升计划。

I just tried by myself and it is working and it is my first Qt and boost program.

在.pro文件中,你只需要添加

In the .pro file you only need to add

LIBS += \
       -lboost_system\

因为我用提升压DIR在我包括源文件我没有提到包含文件。

I did not mention include file as I am using mentioning boost dir in my include in source file.

#include <boost/asio.hpp>
#include <boost/bind.hpp>

有关程序包,如果您使用的Fedora / RHEL系统只是做

For packages, if you are using Fedora/RHEL system just do

yum install boost boost-devel

和基于Ubuntu系统

And for Ubuntu based system

sudo apt-get install libboost-all-dev

希望这有助于。

这篇关于与Qt创建者和Linux提振的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆