![]() |
Menu |
![]() |
||
| Introduction Documentation Download |
|
Development Bugs News |
||
This section will explain how to get started using the compiler under windows systems. Before you begin, you should download the compiler. This can be found in the download section
At the command prompt, in the directory where gene is located, type 'gene05 Filename' where Filename is the full path and name of the project unit to compile. If there are no errors in the source, Gene will generate C source and header files for each project and library in the project unit. If the project is very big, it will split the C source file into multiple files. The name of each source and header file group consists out of the name of the process or lib as defined in the project unit + the sequence number of the file + '.c' for the source file and '.h' for the header file.
If there are errors in the project unit, an 'errors.log' file will be generated in the same directory as the project unit containing all of the error messages.
ex:c:\gene\gene05 "c:\my projects\test1\test.gen"When there are no errors in the source, the following files will be generated:
c:\my projects\test1\x.c
c:\my projects\test1\x.h
(c:\my projects\test1\x.mak)
c:\my projects\test1\y.c
c:\my projects\test1\y.h
(c:\my projects\test1\y.mak)When there are errors, a message will be displayed, and the following file will be generated:
c:\my projects\test1\errors.log
Gene 0.5 generates pure C code and should be pretty portable apart from the manner of casting which does not work on all compilers (needs to be corrected) . Although It generate it's a make file, it is best to create your own. The generated make files are curently only in the borland dialect and are not up to date. If you want to use a compiler that uses a different make, please feel free to add an option into the compiler and modify the CGenerator.gen unit.
Although Gene is case insensitive, this should not bother the C code cause external names of functions are handled case sensitive, so you can link the object files as usual.Next is a step by step explanation for compiling gene 0.5:
borland C++ 5.5
This is a free version of the borland compiler which you can download here. Don't forget to configure the compiler before using it. Here's another explanation for installing and configuring the compiler.
Note: you need to setup tasm.exe properly before you can
compile. You do this by creating a text file called 'tasm.cfg' in
the bin directory of the borland compiler. Put the statement
'-kh32768' (without quotes) in the file. This will set the Hash
table size of the assembler to a proper size. Without this, the
compiler wont compile any gene projects.
borland C++ builder
This is not a free compiler,
so you need to buy a licence
for it. It gives powerfull debug facilities though, so it can be
interesting.
Note: you need to setup tasm.exe properly before you can compile. You do this by creating a text file called 'tasm.cfg' in the bin directory of the borland compiler. Put the statement '-kh32768' (without quotes) in the file. This will set the Hash table size of the assembler to a proper size. Without this, the compiler wont compile any gene projects.
Note2: Builder has only been tested with version 5. Other
versions might give problems.
UltraEdit is a shareware text editor that offers customisable syntax highlighting and tool configuration possibities. This can make life a whole lot easier. There is a definition file included of the gene language so you can have syntax highlighting. Follow these steps to install it:
When this is done, you can select advanced/Compile gene to perform a compilation on the currently active text file. If you have the errors.log file also open, you can emmidiatly see the output of the compilation.