Hi everybody!.
I want to use Intel TBB library with my Qt project. I have compiled the library from source and have both the debug and release dlls.
Before adding TBB to my project, I created a new one, just for testing. It is a plain C++ project where the only files are a main.cpp and the .pro. Here're both:
.pro file
TEMPLATE = app
CONFIG += console
CONFIG -= qt
SOURCES += main.cpp
#QMAKE_CXXFLAGS += -fopenmp
#QMAKE_LFLAGS += -fopenmp
INCLUDEPATH += "E:/LIBRERIAS/tbb-4.1_src/include"
LIBS += -L"E:/LIBRERIAS/tbb-4.1_src/build/windows_intel64_gcc_mingw4.5.4_debug" \
-ltbb_debug
TEMPLATE = app
CONFIG += console
CONFIG -= qt
SOURCES += main.cpp
#QMAKE_CXXFLAGS += -fopenmp
#QMAKE_LFLAGS += -fopenmp
INCLUDEPATH += "E:/LIBRERIAS/tbb-4.1_src/include"
LIBS += -L"E:/LIBRERIAS/tbb-4.1_src/build/windows_intel64_gcc_mingw4.5.4_debug" \
-ltbb_debug
To copy to clipboard, switch view to plain text mode
main.cpp
#include <iostream>
#include "tbb/task_scheduler_init.h"
int main()
{
tbb::task_scheduler_init init;
std::cout << "Everything ok\n";
return 0;
}
#include <iostream>
#include "tbb/task_scheduler_init.h"
int main()
{
tbb::task_scheduler_init init;
std::cout << "Everything ok\n";
return 0;
}
To copy to clipboard, switch view to plain text mode
If I compile the .cpp from the Windows terminal (with g++.exe -I%TBB_INCLUDE% -L%TBB_DEBUG_LIB% -l tbb_debug.dll) I don't get any error messages and can execute the program. However,
if I try to compile it from QtCreator I get this error:
E:/LIBRERIAS/tbb-4.1_src/build/windows_intel64_gcc_mingw4.5.4_debug/tbb_debug.dll: file not recognized:File format not recognized
collect2: ld returned 1 exit status
E:/LIBRERIAS/tbb-4.1_src/build/windows_intel64_gcc_mingw4.5.4_debug/tbb_debug.dll: file not recognized:File format not recognized
collect2: ld returned 1 exit status
To copy to clipboard, switch view to plain text mode
So, what I'm doing wrong?.
Thanks.
PS: By the way, in the Projects folder these are the targets for the Build step:
qmake.exe prueba_tbb.pro -r -spec win32-g++ "CONFIG+=declarative_debug
mingw32-make.exe in E:PRUEBAStbbprueba_tbb-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW_
qmake.exe prueba_tbb.pro -r -spec win32-g++ "CONFIG+=declarative_debug
mingw32-make.exe in E:PRUEBAStbbprueba_tbb-build-desktop-Qt_4_8_1_for_Desktop_-_MinGW_
To copy to clipboard, switch view to plain text mode
Bookmarks