Menu

compile

compile (2)
Nightinggale col2071
Attachments
compile.jpg (58230 bytes)
target selection.jpg (60260 bytes)

This page tells how to compile a DLL file. It is assumed that the reader has no prior knowledge and and will be a step by step telling what to click.

Prerequires:
You have the source code ready [GIT switch branch]
You have installed the compiler [compiler setup]

First you open the file sourceDLL\Project Files\Colonization Mod Collection.vcxproj
Tip: if you compile frequently (like using DLL develop branch), you may want to make an alias to this file and place it somewhere with easier access, like the desktop.

Select the type of DLL file you want.

Types of DLL files:
- Release: optimized to be as fast as possible. Used for stable releases.
- Assert: Same as release, except it adds a whole lot of checks on data from DLL and XML files to find bugs.
- Debug: slow DLL only used by coders. Can examine code behavior while playing and is perfect for bug and crash examination.
- Profile: (rarely used) DLL used to monitor time spend in each line of code. Used to find places where performance can be improved.

Some targets have -fast in their names. -fast mean the compiler will use all CPU cores when compiling instead of just one and hence compile faster. The result should be the same regardless of using -fast or not.

Assert-fast should be the number one choice for anybody compiling code from git. Even if you don't change anything yourself, it may find bugs made by other people.

Once you have selected target, you build.

... wait

......wait

1-2 minutes later (on a modern computer) the screen should hopefully look like this.

If you copied one file twice you managed to compile yourself and the game is ready to be started.

Common errors:
File didn't copy: quit the game and build again.

Error due to a .tmp file: build again. This mysterious error shows up at random and second attempt works.

Can't find nmake.exe: check last step in [compiler setup]


Related

Wiki: GIT switch branch
Wiki: compiler setup

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.