Check the svgalib section in this document on how to install and setup this library. If you want to use graphics by uses graph You might get a -lvga error, this is since the vga library from is missing since it does not come with lazarus. However lazarus does not show a console window when debugged.įor the non Pascal expert, the following includes the standard library crt that deals with cursor movements in the console (similar to ncurses): uses crt lazarus creates a project with manyįiles, this might be an overkill for small pascal programs.To Debug gdb has to be selected in the menu. The non Unix systems (DOS, OS/2, Win32) have a reasonable implementation already, except that they are based on completely standalone codebases and partly duplicate functionality already. Console applications however can be created via Project -> New project from file, where Program can be selected to get a console application. The Crt unit is a standard Turbo Pascal unit to random access write to the screen using direct memory mapped access. Lazarus should just be used for gui applications (similar to borland delphi). However there are many issues that fp has To debug there is option mode debug andĬompile options for the debugger. To run fpc-ide type fp and a text based window as good old turbo pascal appears. To include units (in the example, units that are in the directory units next to the directory holding the pas file) that are in an other location run Unit Search Interface type arr array of integer var s: string procedure binarysearch(x: integer Ar: arr var.
Simple applications can be compiled directly on the command line as:
Since fpc is a compiler, executable binaries are created that run directly. There is the free pascal compiler emerge fpc and an ide emerge fpc-ide and the full blown featured IDE for gui applications and delphi lazarus emerge lazarus.