VC++ project using unmanaged DLL in a multi-project solution causes linking errors when building

I have a very strange problem with a multi-project solution in VS 2010. I had a solution with a single project in C++/CLR which interfaced a third-party unmanaged DLL. Now, I moved this project into a multi-project solution. I double-checked that all include / additional library parts are correct (I have this problem even when I set the absolute paths to the include and lib dir) and the .lib accompanying the third-party DLL is correctly referenced.

Now, when trying to build the project, I get a bunch of LNK2028, LNK2019, LNK2020 and the like.

However, when I create a single solution with only this project, it builds fine.

Does VS2010 not support multi-project solutions when one project references unmanaged code?

EDIT: I investigated some more, here is what happens:

  1. Opening the project in a single solution => Builds fine.
  2. Adding the very same project to an existing solution => Linker errors
  3. Adding a new project to the solution with the single VC++ project => Builds fine.


Source: dll

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.