Community
cancel
Showing results for 
Search instead for 
Did you mean: 
mwhenson
Beginner
91 Views

Linking with /clr switch

When I try to build with a /clr switch, I get the following errors if tbb_exception.h is included. If /clr switch is off or i remove the tbb_exception.h include, it builds fine. Any ideas on what is going on or how to fix it? Thanks!

22> error LNK2028: unresolved token (0A002130) "private: void __thiscall tbb::captured_exception::clear(void)" (?clear@captured_exception@tbb@@$FAAEXXZ) referenced in function "public: virtual __thiscall tbb::captured_exception::~captured_exception(void)" (??1captured_exception@tbb@@$FUAE@XZ)
22>obj : error LNK2028: unresolved token (0A002131) "private: void __thiscall tbb::captured_exception::set(char const *,char const *)" (?set@captured_exception@tbb@@$FAAEXPBD0@Z) referenced in function "public: __thiscall tbb::captured_exception::captured_exception(class tbb::captured_exception const &)" (??0captured_exception@tbb@@$FQAE@ABV01@@Z)
22>obj : error LNK2019: unresolved external symbol "private: void __thiscall tbb::captured_exception::set(char const *,char const *)" (?set@captured_exception@tbb@@$FAAEXPBD0@Z) referenced in function "public: __thiscall tbb::captured_exception::captured_exception(class tbb::captured_exception const &)" (??0captured_exception@tbb@@$FQAE@ABV01@@Z)
22>obj : error LNK2001: unresolved external symbol "public: virtual class tbb::captured_exception * __thiscall tbb::captured_exception::move(void)" (?move@captured_exception@tbb@@UAEPAV12@XZ)
22>obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall tbb::captured_exception::destroy(void)" (?destroy@captured_exception@tbb@@UAEXXZ)
22>obj : error LNK2019: unresolved external symbol "private: void __thiscall tbb::captured_exception::clear(void)" (?clear@captured_exception@tbb@@$FAAEXXZ) referenced in function "public: virtual __thiscall tbb::captured_exception::~captured_exception(void)" (??1captured_exception@tbb@@$FUAE@XZ)
0 Kudos
6 Replies
mwhenson
Beginner
91 Views

Also - this is new to 2.2 and built fine in 2.1.

Mike
Andrey_Marochko
New Contributor III
91 Views

At the first glance the issue may be caused by the missing __TBB_EXPORTED_METHOD qualifier before the offending symbols. Could you insert them (similar to how it is done for name() and what() methods) and see if this helps?

mwhenson
Beginner
91 Views

At the first glance the issue may be caused by the missing __TBB_EXPORTED_METHOD qualifier before the offending symbols. Could you insert them (similar to how it is done for name() and what() methods) and see if this helps?

Unfortunately that didn't work... Do you have any other suggestions? Thanks,

Mike
Andrey_Marochko
New Contributor III
91 Views

Hi, Mike

Sorry to say that, but after checking .def files I see that unfortunately TBB simply does not export these methods :(. And you are obviously the first one who needed them.

We'll fix this in the Update 1 to 2.2. If you use open source version, I could give you instructions how to export the missing methods.
mwhenson
Beginner
91 Views

Hi, Mike

Sorry to say that, but after checking .def files I see that unfortunately TBB simply does not export these methods :(. And you are obviously the first one who needed them.

We'll fix this in the Update 1 to 2.2. If you use open source version, I could give you instructions how to export the missing methods.
I don't actually use them, but it appears that the /clr switch forces the compiler to link whether they are used or not. Commenting out all these methods from the .h file will do until the Update 1. Thanks,

Mike
Andrey_Marochko
New Contributor III
91 Views

Quoting - mwhenson
I don't actually use them, but it appears that the /clr switch forces the compiler to link whether they are used or not. Commenting out all these methods from the .h file will do until the Update 1. Thanks,

Mike

Thanks to you for reporting the problem.
Reply