+ Reply to Thread
Results 1 to 1 of 1

Thread: Using Intel TBB with QtCreator in Windows 7

  1. #1
    Join Date
    Nov 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Using Intel TBB with QtCreator in Windows 7

    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
    Qt Code:
    1. TEMPLATE = app
    2. CONFIG += console
    3. CONFIG -= qt
    4.  
    5. SOURCES += main.cpp
    6.  
    7. #QMAKE_CXXFLAGS += -fopenmp
    8. #QMAKE_LFLAGS += -fopenmp
    9. INCLUDEPATH += "E:/LIBRERIAS/tbb-4.1_src/include"
    10. LIBS += -L"E:/LIBRERIAS/tbb-4.1_src/build/windows_intel64_gcc_mingw4.5.4_debug" \
    11. -ltbb_debug
    To copy to clipboard, switch view to plain text mode 

    main.cpp
    Qt Code:
    1. #include <iostream>
    2.  
    3. #include "tbb/task_scheduler_init.h"
    4.  
    5. int main()
    6. {
    7. tbb::task_scheduler_init init;
    8. std::cout << "Everything ok\n";
    9.  
    10. return 0;
    11. }
    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:

    Qt Code:
    1. E:/LIBRERIAS/tbb-4.1_src/build/windows_intel64_gcc_mingw4.5.4_debug/tbb_debug.dll: file not recognized:File format not recognized
    2. 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:
    Qt Code:
    1. qmake.exe prueba_tbb.pro -r -spec win32-g++ "CONFIG+=declarative_debug
    2. 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 
    Last edited by AdriCS; 30th November 2012 at 11:32. Reason: updated contents

+ Reply to Thread

Similar Threads

  1. Replies: 2
    Last Post: 28th April 2009, 08:37
  2. Qt 4 w/Intel C++ 10.1 on Mac OS X
    By spyder482 in forum Qt Programming
    Replies: 1
    Last Post: 27th February 2008, 20:06
  3. Intel C++ compiler w/ Qt?
    By gfunk in forum Qt Programming
    Replies: 1
    Last Post: 23rd August 2007, 22:11
  4. which compiler for Qt on Intel Mac
    By jcr in forum Installation and Deployment
    Replies: 1
    Last Post: 8th July 2006, 21:32
  5. Mac OS X Intel && Qt 4.1
    By Sergey B. in forum Qt Programming
    Replies: 5
    Last Post: 22nd January 2006, 14:30

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts