在Qt中提升:在架构x86_64中找不到安装和符号

时间:2014-08-16 19:46:40

标签: qt boost

我在休息一年后回到Qt和C ++编程。我正在尝试将升级库安装到Mac上的Qt(10.9.4)中,我完全感到困惑。这就是我所做的:

我使用自制软件安装了boost。

我看到hpp文件安装在这里:

/usr/local/Cellar/boost/1.55.0_2/include/boost

和图书馆:

/usr/local/Cellar/boost/1.55.0_2/lib

现在我开始一个新的Qt控制台项目。

项目文件:

 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();
 }

不编译。的问题:

Symbol(s) not found for architectures x86_64
linker command failed with exist code 1

因为我绝对不会有提升,我做得对吗?如果是,为什么不编译?

非常感谢!

1 个答案:

答案 0 :(得分:1)

你也需要与推特联系!

LIBS += -L/usr/local/Cellar/boost/1.55.0_2/lib -lboost