Hi All ,
I have written an image processing related code. I used TBB for parallel implementation of computationally intensive for loops. The program runs fine on Linux. I am trying to port it on windows. When I try to build the executable , I get following linker error:
Error 61 error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl InitializeCriticalSectionAndSpinCount(struct _RTL_CRITICAL_SECTION *,unsigned long)" (__imp_?InitializeCriticalSectionAndSpinCount@@YAHPEAU_RTL_CRITICAL_SECTION@@K@Z) referenced in function "int __cdecl inlineInitializeCriticalSectionEx(struct _RTL_CRITICAL_SECTION *,unsigned long,unsigned long)" (?inlineInitializeCriticalSectionEx@@YAHPEAU_RTL_CRITICAL_SECTION@@KK@Z) D:\projects\rocs_winmain\build\vs2010\release\test\feature_detection\vlfeat_interface.lib(affinefeaturedetector.obj)
I have linked the executable with tbb libraries ( tbb.lib , tbbmalloc.lib , tbbmalloc_proxy.lib ). What could I have to possibly link more to remove this linking error?...
The linking problem is coming from TBB only , because when I comment out the tbb implementation , my programs runs just fine.