Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

tbb 2.1 Update 2 link errors

jontron
Beginner
298 Views
When upgrading from tbb 2.1 update 1 to tbb 2.1 update 2, I am getting the following linker errors with Visual Studio 2008 SP1 on XP 32-bit when building the x64 platform:

---------------------------------------------------
3>foo.obj : error LNK2005: _mm_cvtpi16_ps already defined in bar.obj
3>foo.obj : error LNK2005: _mm_cvtpu16_ps already defined in bar.obj
3>foo.obj : error LNK2005: _mm_cvtps_pi16 already defined in bar.obj
3>foo.obj : error LNK2005: _mm_cvtpi8_ps already defined in bar.obj
3>foo.obj : error LNK2005: _mm_cvtpu8_ps already defined in bar.obj
3>foo.obj : error LNK2005: _mm_cvtps_pi8 already defined in bar.obj
3>foo.obj : error LNK2005: _mm_cvtpi32x2_ps already defined in bar.obj
3> Creating library .\..\..\..\Release\x64/MyProject.lib and object .\..\..\..\Release\x64/MyProject.exp
3>bar.obj : error LNK2019: unresolved external symbol _m_punpcklwd referenced in function _mm_cvtpi16_ps
3>foo.obj : error LNK2001: unresolved external symbol _m_punpcklwd
3>bar.obj : error LNK2019: unresolved external symbol _mm_cvt_pi2ps referenced in function _mm_cvtpi16_ps
3>foo.obj : error LNK2001: unresolved external symbol _mm_cvt_pi2ps
3>bar.obj : error LNK2019: unresolved external symbol _m_punpckhwd referenced in function _mm_cvtpi16_ps
3>foo.obj : error LNK2001: unresolved external symbol _m_punpckhwd
3>bar.obj : error LNK2019: unresolved external symbol _m_pcmpgtw referenced in function _mm_cvtpi16_ps
3>foo.obj : error LNK2001: unresolved external symbol _m_pcmpgtw
3>bar.obj : error LNK2019: unresolved external symbol _mm_setzero_si64 referenced in function _mm_cvtpi16_ps
3>foo.obj : error LNK2001: unresolved external symbol _mm_setzero_si64
3>bar.obj : error LNK2019: unresolved external symbol _m_packssdw referenced in function _mm_cvtps_pi16
3>foo.obj : error LNK2001: unresolved external symbol _m_packssdw
3>bar.obj : error LNK2019: unresolved external symbol _mm_cvt_ps2pi referenced in function _mm_cvtps_pi16
3>foo.obj : error LNK2001: unresolved external symbol _mm_cvt_ps2pi
3>bar.obj : error LNK2019: unresolved external symbol _m_punpcklbw referenced in function _mm_cvtpi8_ps
3>foo.obj : error LNK2001: unresolved external symbol _m_punpcklbw
3>bar.obj : error LNK2019: unresolved external symbol _m_pcmpgtb referenced in function _mm_cvtpi8_ps
3>foo.obj : error LNK2001: unresolved external symbol _m_pcmpgtb
3>bar.obj : error LNK2019: unresolved external symbol _m_packsswb referenced in function _mm_cvtps_pi8
3>foo.obj : error LNK2001: unresolved external symbol _m_packsswb
3>.\..\..\..\Release\x64\MyProject.dll : fatal error LNK1120: 10 unresolved externals
---------------------------------------------------

The linker error does not occur on the Win32 platform build. When looking at the changes to the include file windows_emt64.h, it no longer includes windows.h, and now includes intrin.h. When commenting out the intrin.h include within windows_emt64.h, the project links successfully.

Is this a bug in tbb, or am I missing an include file or preprocessor option, etc...?

Thanks,
Jon
0 Kudos
2 Replies
Alexey-Kukanov
Employee
298 Views
I tested with every TBB example we shipped with 2.1 Update 2 that it compiles on a 32-bit Windows machinewith the VS 2008 cross-compiler for x64. No changes to the VS project files were required; 64-bit configurations worked out of the box.

If you could possibly share a reproducer test that fails in your case, it would help with further investigations. And you could also try the examples, to see if those build fine on your machine.
0 Kudos
robert-reed
Valued Contributor II
298 Views
If you could possibly share a reproducer test that fails in your case, it would help with further investigations. And you could also try the examples, to see if those build fine on your machine.

If this is the same Jon who filed a very similar sounding issue via Premier.intel.com, please respond to the Premier request rather than to here. Since Alexey has verified that the case you describe seems to work in general, we'll take this offline to help you find the specific issue with your environment. Thanks.
0 Kudos
Reply