what I’m trying is fairly common but I can’t find any pointers about this on the web.
I have 2 unmanaged C++ projects in one VS 2010 solution.
I can compile both of them fine and I set the project dependencies right under Solution > Properties.
What I’d like to do would be to be able to use my classes / function from project A in project B, what else do I need to do?
thanks
In the project properties:
Under C/C++ => General, add the folder containing A’s headers to “Additional Include Directories.”
Under Linker => General, add the folder containing A’s output (the A.lib file that you want linked in) to “Additional Library Directories.”
Under Linker => Input, add A.lib to the “Additional Dependencies” list.
You will need to make sure that the projects share the same configuration properties. For example, you cannot mix images built against different runtime libraries, so you can’t mix and match release and debug builds.
Once you have thus configured the projects, you can include A’s header file in your B source files and call the functions defined in A from your code in B.