Path of least resistance when unit testing C++ code in an exe, in Visual Studio 2012

前端 未结 3 897
挽巷
挽巷 2021-02-20 12:33

I\'m in need of some sage advice here. Long story short, I\'m rebuilding a - for me - relatively complex app comprised of about 7000 lines of code. I ran into a number of issues

3条回答
  •  别跟我提以往
    2021-02-20 13:19

    There's a nifty option when you use a project dependency, that lets you choose between linking the output file or having the IDE automatically select all the object files from the other project as dependencies.

    enter image description here

    (Don't worry about the .NET stuff in the screenshot, this was taken from an project where a C++/CLI DLL included a native static library project. Just do the same thing with a native test project including a native DLL or EXE project, choosing to link with the inputs.)

提交回复
热议问题