Windows下的QtCreator和TBB [英] QtCreator and TBB under Windows
问题描述
我使用 Mingw 从源代码编译 TBB,遵循这篇文章中的评论 #5:http://software.intel.com/en-us/forums/topic/291331.一切顺利.
I have compiled TBB from source using Mingw following the comment #5 in this post: http://software.intel.com/en-us/forums/topic/291331. That went ok.
当我尝试在 QtCreator 项目中使用新的 TBB 库时,出现以下错误(忽略警告消息):http://postimage.org/image/yrrecugix/
When I try to use the new TBB library in a QtCreator project, I end with this errors (ignore the warning messages): http://postimage.org/image/yrrecugix/
这是我尝试过的示例代码(我省略了非 tbb 代码):
Here's the sample code I tried (I omit the non-tbb code):
#include "tbb/task_scheduler_init.h"
int main()
{
tbb::task_scheduler_init init;
/// more things.
}
这是 .pro 文件:
TEMPLATE = app
CONFIG += console
CONFIG -= qt
SOURCES += main.cpp
#QMAKE_CXXFLAGS += -fopenmp
#QMAKE_LFLAGS += -fopenmp
INCLUDEPATH += "E:TRABAJOLIBRERIAS bb-4.1_srcinclude"
LIBS += -L"E:TRABAJOLIBRERIAS bb-4.1_srcuildwindows_intel64_gcc_mingw4.5.4_debug"
-ltbb_debug
有什么想法吗?
谢谢!
推荐答案
在 Windows 上使用 MinGW 构建时,TBB 二进制文件是 tbb.dll
和 tbb_debug.dll
.配置文件中的选项 -ltbb_debug
可能会导致链接器查找 libtbb_debug.<something>
.它找不到这样的二进制文件并报告未解析的符号.
When built with MinGW on Windows, TBB binaries are tbb.dll
and tbb_debug.dll
. The option -ltbb_debug
in your configuration files probably causes the linker to look for libtbb_debug.<something>
. It can't find such a binary and reports about unresolved symbols.
这篇关于Windows下的QtCreator和TBB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!