|
|
## MS Visual Studio
|
|
|
|
|
|
These notes are older and based on VS 2017. Please post to our user forum if you have more recent experience.
|
|
|
|
|
|
The Visual C++ Visual Studio is a free download at [https://www.visualstudio.com/](https://www.visualstudio.com/)\
|
|
|
We tested Visual C++ 2017, although not extensively. The code does compile without errors and successfully passes the smoke test.
|
|
|
|
|
|
### Creating a new project
|
|
|
|
|
|
Use file/new to create a new project. In "Project Types" select "Visual C++ Projects" / Win32.\
|
|
|
Enter a name for the project and browse to a location. Click OK. The project will be in a folder under that specified in the location. Under "application settings" select "console application" and "empty project", then "finish".
|
|
|
|
|
|
Add all the source and header files to the project with the "project/add existing files" option.\
|
|
|
Then remove the files with names "Test\*.cpp", and the files md5datafile.cpp and cloudy_lua.cpp, as they are not used.
|
|
|
|
|
|
### Compiler options
|
|
|
|
|
|
under "project / properties / configuration properties" set the following for all configurations:
|
|
|
|
|
|
"c/c++ / preprocessor / preprocessor definitions" add the following:
|
|
|
|
|
|
```plaintext
|
|
|
CLOUDY_DATA_PATH="c:\\cloudy\\trunk\\data\\"
|
|
|
```
|
|
|
|
|
|
The string in the CLOUDY_DATA_PATH macro should be modified to give the actual location of the code's data directory. If there are problems setting the path, it can _alternatively_ be set by editing the __path.h__ file. Path.h contains instructions for setting the path depending on operating system.
|
|
|
|
|
|
Define the macro OLD_ASSERT if you wish to use old-style asserts.
|
|
|
|
|
|
_c/c++ / optimization_ Make sure that "inline function expansion" is set to `"only __inline"`.\
|
|
|
The code will run about ten times more slowly if this is not set. Set Optimization to Maximize Speed.
|
|
|
|
|
|
_c/c++ / Code generation_ set Basic runtime checks to default.
|
|
|
|
|
|
_c/c++/general_ Set "Debug Information Format" to "Program Database (/Zi)"
|
|
|
|
|
|
_configuration properties / c/c++ / advanced_ Disable warnings 4244; 4305; 4996; 4838 - these warn against double to realnum, and use of fopen;
|
|
|
|
|
|
_"c/c++/general"_ To compile in multiple threads set "Multi-Processor Compilation" to "Yes (/MP)", but you will also have to under "c/c++/code generation" change "Enable Minimal Rebuild" to "No (/Gm-)" as the two options are incompatible. The /MP option is also incompatible with the #import, /E, /EP, /showIncludes, and /Yc, but in the versions tested these were not used by default. |
|
|
\ No newline at end of file |