How to test a dll using cppunit
I want开发者_如何学Python to test a Dll using cppunit. I have created a testcase dll. I have linked the .lib file to my testcase dll. I am calling the function to be tested from my testcase dll. But when iam trying to compile the testcase dll, it is giving linker error(for the function to be tested). Do I need to export all the functions that I need to unit test?
I am new to CPPUNIT. Can anyone help me on this.
Thanks
it's not related with CppUnit. to use something outside of dynamic library you need to export it. possible solution is to have statically-linked library with all your code. this lib can be tested by testcase.dll w/o any exports. and simple wrapper.dll over your static.lib that exports only required stuff
精彩评论