QtCreator and TBB under Windows

穿精又带淫゛_ 提交于 2019-12-18 09:45:15

问题


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.

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/

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.
}

And here's the .pro file:

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

Any idea?.

Thanks!.


回答1:


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.



来源:https://stackoverflow.com/questions/13606029/qtcreator-and-tbb-under-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!