2015-11-11 43 views
-1

我在test.pro补充道:QT使用升压/ circular_buffer.hpp已在Windows系统错误

INCLUDEPATH += E:\boost_1_59_0 

主要测试文件是:

main code

的错误是:

E:\boost_1_59_0\boost\circular_buffer\base.hpp:384: error: undefined reference to `_wassert'

我不知道。

+0

这可能会帮助你http://www.qtcentre.org/threads/6706-Qt-Portmidi-in-Windows-libraries-problem – Sigstop

+0

首先从“Build”菜单中运行qmake。这实际上更新了QT Creator IDE内部使用的make文件。在上述步骤之后,您将以通常的方式构建您的项目。这应该工作。 –

回答

0

当使用库,你需要下面的东西添加到您的.pro文件:

INCLUDEPATH += <The path where the header files are located, if not in a system default include path> 

LIBS += -L<The path where the library binary file is located, if not in a system default library path> 
LIBS += -l<The name of the library (without "lib", ".dll", etc. in the name)> 

最后两行可能不适合只有头的库是必要的。但是并非所有的boost都是仅用于标题的,所以你需要指定链接器将在哪里找到库二进制文件。

为此,图书馆本身必须建立,当然。我不确定你是否已经在安装boost的时候这样做了;它看起来像你刚刚下载并提取它在E:\,这可能是不够的。