可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: From this article Unit testing with mock objects in C This is done by using the --wrap linker option which takes the name of the wrapped function as an argument. If the test was compiled using gcc, the invocation might look like: $ gcc -g -Wl,--wrap=chef_cook waiter_test.c chef.c How can I do this when compiling a c project in visual studio? 文章来源: visual studio c linker wrap option?