提升Qt中:安装和图形符号未找到x86_64的架构 [英] Boost in Qt: Installation and Symbol(s) not found for architectures x86_64
本文介绍了提升Qt中:安装和图形符号未找到x86_64的架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一年突破后回Qt和C ++编程。我想在Mac(10.9.4)Boost库安装到Qt和我完全糊涂了。这就是我所做的:
I am back to Qt and C++ programming after a year break. I am trying to install boost library into Qt on Mac (10.9.4) and I am completely confused. This is what I did:
我使用自制安装了提升。
I installed boost using homebrew.
我看到HPP文件都安装在这里:
I see that hpp files are installed here:
/usr/local/Cellar/boost/1.55.0_2/include/boost
和这里的库:
/usr/local/Cellar/boost/1.55.0_2/lib
现在我开始一个新的Qt控制台项目。
Now I start a new Qt console project.
项目文件:
QT += core
QT -= gui
TARGET = testQt
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
SOURCES += main.cpp
INCLUDEPATH += /usr/local/Cellar/boost/1.55.0_2
和主文件:
#include <QCoreApplication>
#include <QtCore>
#include <iostream>
#include <QDebug>
#include <boost/regex.hpp>
using namespace std;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
std::string line;
boost::regex pat( "^Subject: (Re: |Aw: )*(.*)" );
while (std::cin)
{
std::getline(std::cin, line);
boost::smatch matches;
if (boost::regex_match(line, matches, pat))
std::cout << matches[2] << std::endl;
}
return a.exec();
}
不进行编译。问题:
Not compiling. Issues:
Symbol(s) not found for architectures x86_64
linker command failed with exist code 1
由于我绝对有提升的小白,我有没有做是正确的?如果是的话,为什么不编译?
Since I am absolutely noob with boost, did I do it right? If yes, why is it not compiling?
非常感谢!
推荐答案
您需要用太大提振联系!
You need to link with boost too!
LIBS += -L/usr/local/Cellar/boost/1.55.0_2/lib -lboost
这篇关于提升Qt中:安装和图形符号未找到x86_64的架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文