Main entry point (-main)
Specify a Microsoft
Visual C++ extensions of main
Description
This option affects a Code Prover analysis only.
This option is not available for code generated from MATLAB® code or Simulink® models.
Specify the function that you want to use as main.
If the function does not exist, the verification stops with an error
message. Use this option to specify Microsoft®
Visual C++® extensions
of main.
Set Option
Set the option using one of these methods:
Polyspace® user interface (desktop products only): In your project configuration, select the Code Prover Verification node and then select a value for this option. See Dependencies for other options that you must enable first.
Polyspace Platform user interface (desktop products only): In your project configuration, on the Static Analysis tab, select the Run Time Errors node and then select a value for this option.
Command line and options file: Use the option
-main. See Command-Line Information.
Settings
Default: _tmain
_tmainUse
_tmainas entry point to your code.wmainUse
wmainas entry point to your code._tWinMainUse
_tWinMainas entry point to your code.wWinMainUse
wWinMainas entry point to your code.WinMainUse
WinMainas entry point to your code.DllMainUse
DllMainas entry point to your code.
Dependencies
This option is enabled only if you:
Set
Source code language (-lang)toCPP.Select
Verify whole application.
Command-Line Information
Parameter: -main |
Value: _tmain | wmain | _tWinMain | wWinMain | WinMain | DllMain |
Example (Code Prover):
polyspace-code-prover -sources
|
Example (Code Prover
Server):
polyspace-code-prover-server -sources
|
See Also
Verify whole application | Verify module or library (-main-generator)
Topics
- Specify Polyspace Analysis Options
- Verify C Application Without main Function (Polyspace Code Prover)
- Verify C++ Classes (Polyspace Code Prover)