Creating a New Views Application on Microsoft Windows
int
main(int argc, char* argv[])
{
IlvDisplay* display = new IlvDisplay("Views", "", argc, argv);
...
}
Note that ‘main’ is not the regular entry point of an application running on Microsoft Windows (it should be ‘WinMain’). Because of the source code portability that Views provides, and for easier command line parameter parsing, we choose to use the regular C++ ‘main’ entry point. The impact of this choice is discussed further in this topic.
The application name is used for resource scanning (see
Then you can build your view structure and objects and call the global function IlvMainLoop.
int
main(int argc, char* argv[])
{
IlvDisplay* display = new IlvDisplay("Views", "", argc, argv);
...
...
IlvMainLoop();
return 0;
}
Here, since a main function is provided instead of the WinMain entry point that Microsoft Windows expects to start an application, you have to link your object files with the ILVMAIN.OBJ file. This file, supplied with Views, defines a default WinMain function that does all the necessary initialization operations and calls the main function.
To avoid conflicts with other definitions of the main function, which might be provided by some compilers, a preprocessor macro redefines the main function as
For examples, look at the make or project files in the BIN directory.