|
BuildFactory - Compiling yab Source as C++ Code System: BeOS, Haiku, Zeta Binding yab sources is an easy and quick job, however the data in your code isn't very secure. Therefor it's a good thing to compile the sources as a C++ binary. To do this we use the BuildFactory, witch is included in yab. Check under /boot/home/yab-interpreter if there is a folder with the name BuildFactory. If not it's best to download the newest one at the Projektpage. yab can be downloaded over cvs from the Projectpage. How you do this can be found here.
If you have installed cvs you can now switch in the Terminal to the yab-interpreter location. With cvs update you can easily update the yab source to the latest version.
Basic Rules To be able to compile yab sources as C++ binarys you must check the following: - Names for Subroutines can only be used once, no mater how many files you use. If a name is used twice only one will be used. - If you use libraries, please ensure that they are included inside subs and export subs. If you use other functions between sub and export subs, they will be ignored. - All libraries who are merged with import in the program code will be considered. Considered are also Libraries who are merged in Libraries. - The libraries have to be in the same folder as the source file or in /boot/home/config/lib/yab/. - All source files must reside in the BuildFactory folder to compile. Compiling Source code To compile your source code copy all related (to the source code) files inside the BuildFactory folder (Mainfile, Libraries, ...). Open a Terminal session and change into the BuildFactory folder. Now enter the next command in the Terminal to compile the source file:
The binary will be saved in the Buildfactory if you don't add a path to the command. On top of that you will find a few more files, once the new Source code and the error files. Possible Problems - With older ZETA version it can be that the ZETA Tabs don't function, you'll see an error message appearing then. In that case it's best to use the Haiku Tabs. - You have to got ncurses to be able to compile the source code in the BuildFactory. If ncurses is not installed you can find it at BeBits. Tutorial written by Christian Albrecht (Lelldorin) December 2006 Made available by BeSly, the BeOS & Zeta Knowledgebase. |