I am trying to use the TBB in the Qt Creator. I am using the Qt 4.7 and TBB 3.0, below is my setting in .pro.
INCLUDEPATH += C:\tbb30\include
LIBS += C:\tbb30\lib\ia32\vc10\*.lib
My sample code is very simple:
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
tbb::concurrent_vector<int> v;
v.push_back(1);
v.push_back(2);
v.push_back(3);
v.push_back(4);
std::cout<<v.size();
return a.exec();
}
But the program exit with the code -1073741515
Anyone use the 开发者_高级运维TBB in the Qt Creator before?
Best Regards,
in LIBS, I don't think you can use joker characters (*, ?). You need to use the actual name of the lib. Note that you can specify a search path for libs, then the lib name in "short format". If you aim at cross-compilation, it can be useful.
Here is an example to link Open Ssl (might be useful for you)
LIBS += -L$${OPEN_SSL}/lib
LIBS += -llibeay32
LIBS += -lssleay32
Concerning your error code, what compiler are you using (mingwin or visual?). In any case, you can check the generated command to try to understand why it goes wrong (the linker command). Hope this helps.
精彩评论