VectorCAST Stub Functions Without a Prototype

Can VectorCAST stub functions without a prototype? 

By default, VectorCAST will not stub functions that lack a valid prototype. If a function without a prototype is used but not defined, this will result in a link error when building the environment. The undefined_entities.log will show cannot stub this function without a prototype as the reason a stub was not created. To allow a stub to be created, you can add a prototype for the function to unit appendix user code. To do this, follow these steps:

  • Update the environment (Environment | Update Environment...).
  • In the update environment wizard, go to step 7, User Code (optional).
  • Expand the section for Unit Appendix User Code.


  • Double-click in the value column for the unit that uses the un-prototyped function which you want stubbed.
  • Insert a valid prototype for the function.

  • Click Update to rebuild the environment

The resulting environment will be built with a stubbed version of the function.

Article ID: 1507
Last updated: 2019-11-11
Revision: 3
VectorCAST -> C++ Unit Testing -> VectorCAST Stub Functions Without a Prototype