alien.png Compiling and building -- Compiling files
[Previous] [Main] [Next]


Of compiling and building projects, you will probably use the compile option (for one file) the most. Because you always work on one file at a time, this option is there to compile just that file. There are two ways of compiling the file you are working on. First of all is via the Compile button of the project manager. If you press that button, the file you've selected will be saved if that's necessary, and after that a nice compilation window will appear. This window is the window where you can see the progress of the compiled file and whether it was compiled correctly (as shown in figure 35). The second way is via the main menu. The option Project > Compile 'filename.asm' will compile the active edit child. This option is also available on the tool bar and can also be executed by hitting CTRL+F9 in the active edit child... This is quite easy, whilst you are editing, you can compile real fast by just hitting CTRL+F9.

compile window (compile).png
Figure 35. The compiling window

Here you see the compile window in action. I grabbed the image as fast as I could, but I couldn't prevent the file to already be compiled. In the state you see CA3 is making the destination file. This already shows the power of TASM. This source file was 4192 lines of code! CA3 first compiles the file and after that it will create the destination file. If the file you compiled did not belong to the project you are working on or you haven't got a project open, CA3 will skip the destination file. The Destination file will be made by TASM itself in the same directory as the source file with the same name, but with the .obj extension.

There's quite much to see on the screen. Well, the first four text lines should be quite easy to understand. The list box contains all files which will be compiled in this compilation. The little icon next to it will tell the status. A little 'V' means 'OK!', a little '?' means that CA3 still needs to compile this file and a 'X' means that file contained errors...

If you compile a single file like this, the window will disappear as soon as the file is compiled. That means that if you compile a file using the project manager and the file you want to compile is not open at that time, this will mean that you can't see what happened and if the file was compiled correctly...
I've found something to this. If the file is compiled or project is built correctly, the title bar of CA3 will get a green color. If the compilation fails, the title bar will get a red color. If the source is compiled correctly but creating the destination file failed, the title bar will also get a green color.

If you have the file open when compiling or open the file after the compilation and the compilation failed, you will notice a list under the edit able region of the edit child with the corresponding source (see figure 36).

compile (child error).png
Figure 36. Compiling failed!

Here you see a compilation that failed. I'm not going to explain what that list box exactly does. That will be discussed later. What I do want to tell is that you might notice that you twice see there are 2 errors in total. This is done on purpose. First you see the number of errors TASM had. The Total number of errors count can be higher, because of the fact that creating the destination file can also result in an error.