Reputation: 34
If you write a C++/CLI application, and you attempt to use STL:CLR via cliext and you typedef for example a cliext map then you will find that it doesn't work due to a LNK2022 error.
Upvotes: -1
Views: 182
Reputation: 34
I was mistaken in my original answer on how to mitigate the link error as pointed out by Hans in the comment above. Though, he does recommend using Dictionary instead, it is still possible to continue using cliext and solve the problem without unusual workarounds.
The actual answer is that templates do not allow external linkage. This means that somewhere I was using the cliext::map outside of my namespace. The moment that was eliminated, the link error goes away.
Upvotes: 0