Compiling and building projects

Writing code

When you write code in a Module, or in the editor of a window object (visual projects), all constants, variables, structures and frame names are stored in the Properties window. They are divided in two groups:

Frames i Macros
Structures and Variables

The combo box located over the Properties window, allows you to change from a group to another. To go to the code related to a Frame, Structure, Variable, just click on tits name inside the Properties window. If some Frame, Struct, etc., has been added or deleted, and its name is still in the Properties window (or it is missing), press the <F10> key, or use the Tools-->Refresh <window name> menu, while the focus is in the code editor, and the entire Properties window will be updated.

In visual projects the Properties window contains all mentioned names when the code editor of an object is visible or when a Module is the active object (it is always visible for classic projects as they only have modules). When an object is active and its code editor is not visible, the Properties window of the object is displayed instead. Then, the combo box located over the Properties window lets you change among child controls inside the window object.

All files needed for building a project, including those necessary files for Windows applications (, kernel32.dll, user32.dll, etc.), should be added to project through the Easy Code interface (better than including them in the code) using the following menus:

Include files (*.inc) Use Project-->Add Include files (*.inc;.h) menu
Dynamic link files (*.dll;*.ocx;*.drv;*.exe) Use Project-->Add files to link menu
Compiled resource file (*.res) Use Project-->Add external resources (*.res) menu

You do not need to write the ALIGN directive in your code as it is always written internally by Easy Code. The value for aligning code and data will be that specified in the Alignment item of the Project properties.

Include files (*.inc;*.h) are always searched in the following directories:

- The current directory
- The project directory
- The Include directory of the GoAsm folders (specified in the Tools-->Settings menu).

Dynamic link lfiles (*.dll;*.ocx;*.drv;*.exe) are searched in the System directory. The GoLink linker ignores .lib files and takes all needed information from the System dll's.

Using the #DynamicLinkFile directive

Instead of adding the necessary files to be linked to project by clicking the Project-->Add files to Link menu, you can also use the GoAsm #DynamicLinkFile keyword in the source code. Here is the syntax to be used:

#DynamicLinkFile Kernel32.dll User32.dll

or comma delineated

#DynamicLinkFile Kernel32.dll, User32.dll

or in quotes

#DynamicLinkFile "Kernel32.dll", "User32.dll"

Using Rich Edit and Common controls

Checking/unchecking these two options in the Project properties will cause the corresponding buttons to be shown/hidden in the tool box.

Only when working with visual projects, checking any of these options will make Easy Code to add and initialize the corresponding controls.

In classic projects, the Comon controls and RichEdit options, in the
project properties, just add or remove the buttons in the tool box. If you have to use any of them, you must include the corresponding inc and dll files.

Compiling and building projects

    Inside the menu Build you will find the following submenus:

        Compile <Module name> (Ctrl+F7)

Compiles the active window or module.

        Build <Project name>.<extension> (F7)

Compiles the windows or modules that have been modified and builds the project.

        Rebuild all

Compiles all windows and modules (modified or not) and rebuilds the whole project.

        Test <
window name(Shift+F5)  (Only available for visual projects)

Allows you to test the active window in order to see its final appearance. No code is processed when testing a window, but you can check menus and string resources and navigate through child controls checking its tab order. This option is only available for visual projects.

        Debug <
Project name>.exe (F5)  (Only available for executable files)

Allows you to run a debugger with the built executable file (if any). When it was built in Debug mode, the executable file debugged is that located in the Debug directory. If not, the executable file debugged is that located in the Release directory. This option just loads the debbuger (its path has to be specified in menu Tools->Settings), but has no control over it.

        Run <
Project name>.exe (Ctrl+F5)  (Only available for executable files)

Allows you to run the built executable file (if any). When it was built in Debug mode, the executable file started is that located in the Debug directory. If not, the executable file started is that located in the Release directory.

In the bottom part of the IDE you can see the output window (if it is hidden, it is shown when compiling and or linking) which can be shown/hidden by pressing the <F8> key. This window shows all errors returned by the assembler (GoAsm.exe) and the linker (GoLink.exe). By double clicking on an error line of the output window, you will
directly go to the afected line in the code.

: As Easy Code compiles its projects with the assembler specified in the
Tools->Settings menu, the correct syntax when writing code must be that needed for the specified assembler. The examples coming with Easy Code have been programmed for the GoAsm.exe assembler and the GoLink.exe linker.