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

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

问题描述

我按照这篇文章中的评论 #5 使用 Mingw 从源代码编译了 TBB: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:\TRABAJO\LIBRERIAS\tbb-4.1_src\include"
LIBS += -L"E:\TRABAJO\LIBRERIAS\tbb-4.1_src\build\windows_intel64_gcc_mingw4.5.4_debug\" \
        -ltbb_debug

有什么想法吗?.

谢谢!

推荐答案

在 Windows 上使用 MinGW 构建时,TBB 二进制文件为 tbb.dlltbb_debug.dll.配置文件中的选项 -ltbb_debug 可能会导致链接器查找 libtbb_debug..它找不到这样的二进制文件并报告未解析的符号.

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天全站免登陆