在动态链接库的世界中,客户端代码就更容易受到API变化的影响了。
In the world of dynamically linked code, the client code is particularly vulnerable to API changes.
下面所示的用户退出代码被编译成动态链接库(如dll)。
The user exit code shown below is compiled as a dynamic linking library (for example: DLL).
注意,不需要单独的主函数,代码也不使用任何链接库:作为Boost一部分的unit _ test . hpp头文件中包含所需的所有定义。
Notice that no separate main function is needed, nor does the code use any link library: the unit_test.hpp header that's part of the Boost installation contains all the necessary definitions.
应用推荐