Windows下的QtCreator和TBB [英] QtCreator and TBB under Windows

查看:16
本文介绍了Windows下的QtCreator和TBB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 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.dlltbb_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屋!

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