- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all,
This isnot a question but more like a tip, which might help since I couldn't find anything about it in the documentation. At home I am still using vstudio 2003 sp1 (a.k.a msvc 7.1). Sources of tbb (version 2.2) includes visual studio projects starting from 2005. In order tobuildit on vstudio 2003, one has to edit the vcproj files (which are basically xml files), with the following edits:
- 'Version="8,00"' -> 'Version="7,10"'
- Somehow it also chocked on the x64 configurations. So remove the complete configurations of 'Name="Debug|x64"' and '"Release|x64"' both in the global '' sectionas in the individual file properties section, tagged by ''
Doing this for all the proj files ('tbb.vcproj', 'tbbmalloc.vcproj' and 'tbbmalloc_proxy.vcproj') and one would have a buildable tbb on vstudio 2003. The sln needs to have tag 8.00.
Maybe this helps.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just donwloaded TBB 3.0 version 5. However with above trick it still wouldn't compile due to a linker error:
tbb_main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static int std::locale::id::_Id_cnt" (__imp_?_Id_cnt@id@locale@std@@2HA).
It turned out that there is a small hack in: 'scheduler_common.h'(41):#define private public. This changes the protection level, but m$ somehow uses the protection level also in its name mangling algorithm for exported data and functions(the symbol present is __imp_?_Id_cnt@id@locale@std@@0HA). Awork aroundcould be to adjust the tbb header file by adding '#include ' before the '#define private ...' in 'scheduler_common.h'.
Maybethis helps too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all,
This isnot a question but more like a tip, which might help since I couldn't find anything about it in the documentation. At home I am still using vstudio 2003 sp1 (a.k.a msvc 7.1). Sources of tbb (version 2.2) includes visual studio projects starting from 2005. In order tobuildit on vstudio 2003, one has to edit the vcproj files (which are basically xml files), with the following edits:
- 'Version="8,00"' -> 'Version="7,10"'
- Somehow it also chocked on the x64 configurations. So remove the complete configurations of 'Name="Debug|x64"' and '"Release|x64"' both in the global '
' sectionas in the individual file properties section, tagged by ' '
Doing this for all the proj files ('tbb.vcproj', 'tbbmalloc.vcproj' and 'tbbmalloc_proxy.vcproj') and one would have a buildable tbb on vstudio 2003. The sln needs to have tag 8.00.
Maybe this helps.
Generating Code...
Compiling...
itt_notify_proxy.c
Compiling resources...
Linking...
tbb.def : error LNK2001: unresolved external symbol __TBB_machine_cmpswp8
tbb.def : error LNK2001: unresolved external symbol __TBB_machine_fetchadd8
tbb.def : error LNK2001: unresolved external symbol __TBB_machine_fetchstore8
tbb.def : error LNK2001: unresolved external symbol __TBB_machine_load8
tbb.def : error LNK2001: unresolved external symbol __TBB_machine_store8
tbb.def : error LNK2001: unresolved external symbol __TBB_machine_trylockbyte
C:\SVN\TBB\tbb22_20090809oss\build\vsproject_vs2003\ia32\Debug\tbb_debug.lib : fatal error LNK1120: 6 unresolved externals
LINK : fatal error LNK1141: failure during build of exports file
Did you get these errors, and if so, how did you fix them?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Take a look at how these functions are declared in 'windows_ia32.h' header file:
...
extern "C" {
__int64 __TBB_EXPORTED_FUNC __TBB_machine_cmpswp8 (volatile void *ptr, __int64 value, __int64 comparand );
__int64 __TBB_EXPORTED_FUNC __TBB_machine_fetchadd8 (volatile void *ptr, __int64 addend );
__int64 __TBB_EXPORTED_FUNC __TBB_machine_fetchstore8 (volatile void *ptr, __int64 value );
void __TBB_EXPORTED_FUNC __TBB_machine_store8 (volatile void *ptr, __int64 value );
__int64 __TBB_EXPORTED_FUNC __TBB_machine_load8 (const volatile void *ptr);
}
...
I wonder if a "some-wrong-value"assigned to'__TBB_EXPORTED_FUNC' macrocaused the problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are declarations of these functions in 'windows_ia32.h' header file ( as inline-asm ) and in
'atomic_support.asm' file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>LINK : fatal error LNK1141: failure during build of exports file
>>...
I would verify all statements '_MSC_VER >= 1300' in TBB headersbecause for MS Visual Studio 2003 '_MSC_VER' is equal to 1300.
Take into account that two TBB headers 'scalable_allocator.h' and 'tbb_assert_impl.h' ( from TBB v4.0! ) have statements:
...
#if _MSC_VER >= 1400
#define __TBB_EXPORTED_FUNC __cdecl
#else
#define __TBB_EXPORTED_FUNC // Not definedfor MS Visual Studio 2003
#endif
...
A value 1400 is for MS Visual Studio 2005.
I'm not sure that it causessome linking problems in your casesbut a verification won't hurt.
Best regards,
Sergey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes I get this problem too. Look for the 32bit (not the 64 bit) asm files in your solution (i.e. atomic_support.asm, lock_byte.asm) and open its properties. Add
- command line: ml /c /Cp /coff /Fo"$(OUTDIR)\$(InputName).obj" /Zm /Zi "$(InputPath)"
- outputs: $(OUTDIR)\$(InputName).obj
Now it should work. Be sure that the asm files are not excluded from build.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page