<div dir="ltr"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jan 16, 2016 at 2:35 PM, Bo Berglund <span dir="ltr"><<a href="mailto:bo.berglund@gmail.com" target="_blank">bo.berglund@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sat, 16 Jan 2016 12:17:59 -0800, Mehmet Erol Sanliturk<br>
<<a href="mailto:m.e.sanliturk@gmail.com">m.e.sanliturk@gmail.com</a>> wrote:<br>
<br>
>> So I have installed the seed fpc compiler 2.6.4 on the Pi1B now and am<br>
>> checking out the sources for Lazarus 1.4.4 now.<br>
>><br>
>> Will build lazarus 1.4.4 using the seed compiler and then build the<br>
>> program itself. It is just one form with an edit area to write text.<br>
>> Hopefully this will work without fpc 3.0.0<br>
>><br>
>> (Provided I can build Lazarus 1.4.4 of course, since I don't know how<br>
>> to build a GUI application using just fpc.)<br>
><br>
>In your compilation directory , in fpc.cfg , include all necessary LCL unit<br>
>and related include directories .<br>
>If you compile a *.lpr with fpc , it will produce a GUI program .<br>
><br>
><br>
<br>
Thanks for your suggestion.<br>
Meanwhile I have tried to build Lazarus 1.4.4 using the seed compiler<br>
2.6.4 but it always quits with a link error.<br>
I also tried to repeat the method I used on the RPi2 to compile fpc<br>
3.0.0 but the same thing happens after about 7 minutes.<br>
<br>
So I would like to compile my program without lazarus as you suggest<br>
can be done.<br>
<br>
But you say that I should edit the fpc.conf file in the compilation<br>
directory, I assume you mean my project directory, right?<br>
<br>
The problem is that there is no such file in my project dir on the<br>
RPi2 and I also do not know what to put into the file if I create one<br>
from scratch...<br>
<br>
Could you give an example on how such a file would look?<br>
This is probably my last chance of getting this done.....<br>
<br>
(I have never compiled anything manually from the command line)<br>
<span class=""><font color="#888888"><br>
<br>
--<br>
Bo Berglund<br>
Developer in Sweden<br>
<br>
<br>
--<br>
_______________________________________________</font></span><br></blockquote></div><br><br><br><br></div><div class="gmail_extra"><br><br>The following is a sample fpc.cfg to compile a GUI program with fpc ( used in Windows ) :<br></div><div class="gmail_extra"><br><br><br><br><br>-------------------------------------------------------------------<br><br><br><br> <br># <br># Config file generated by fpcmkcfg on 12/5/2009 - 0:37:50 <br># Example fpc.cfg for Free Pascal Compiler <br># <br> <br># ---------------------- <br># Defines (preprocessor) <br># ---------------------- <br> <br># <br># nested #IFNDEF, #IFDEF, #ENDIF, #ELSE, #DEFINE, #UNDEF are allowed <br># <br># -d is the same as #DEFINE <br># -u is the same as #UNDEF <br># <br> <br># <br># Some examples (for switches see below, and the -? helppages) <br># <br># Try compiling with the -dRELEASE or -dDEBUG on the commandline <br># <br> <br> -dNORMAL <br> -uDEBUG <br> -uRELEASE <br> <br> -dDELPHI <br>; -dVER130 <br>; -dVER2_2 <br> <br># For a release compile with optimizes and strip debuginfo <br>#IFDEF RELEASE <br> -O2 <br> -Xs <br> #WRITE Compiling Release Version <br>#ENDIF <br> <br># For a debug version compile with debuginfo and all codegeneration checks on <br>#IFDEF DEBUG <br> -glh <br> -Crtoi <br> #WRITE Compiling Debug Version <br>#ENDIF <br> <br># ---------------- <br># Parsing switches <br># ---------------- <br> <br># Pascal language mode <br># -Mfpc free pascal dialect (default) <br># -Mobjfpc switch some Delphi 2 extensions on <br># -Mdelphi tries to be Delphi compatible <br># -Mtp tries to be TP/BP 7.0 compatible <br># -Mgpc tries to be gpc compatible <br># -Mmacpas tries to be compatible to the macintosh pascal dialects <br># <br># Turn on Object Pascal extensions by default <br>#-Mobjfpc <br> <br># Assembler reader mode <br># -Rdefault use default assembler <br># -Ratt read AT&T style assembler <br># -Rintel read Intel style assembler <br># <br># All assembler blocks are AT&T styled by default <br>#-Ratt <br> <br># Semantic checking <br># -S2 same as -Mobjfpc <br># -Sc supports operators like C (*=,+=,/= and -=) <br># -Sa include assertion code. <br># -Sd same as -Mdelphi <br># -Se<x> compiler stops after the <x> errors (default is 1) <br># -Sg allow LABEL and GOTO <br># -Sh Use ansistrings <br># -Si support C++ styled INLINE <br># -SI<x> set interface style to <x> <br># -SIcomCOM compatible interface (default) <br># -SIcorbaCORBA compatible interface <br># -Sm support macros like C (global) <br># -So same as -Mtp <br># -Sp same as -Mgpc <br># -Ss constructor name must be init (destructor must be done) <br># -St allow static keyword in objects <br># <br># Allow goto, inline, C-operators, C-vars <br>-Sgic <br> <br># --------------- <br># Code generation <br># --------------- <br> <br># Uncomment the next line if you always want static/dynamic units by default <br># (can be overruled with -CD, -CS at the commandline) <br>#-CS <br>#-CD <br> <br># Set the default heapsize to 8Mb <br>#-Ch8000000 <br> <br># Set default codegeneration checks (iocheck, overflow, range, stack) <br>#-Ci <br>#-Co <br>#-Cr <br>#-Ct <br> <br># Optimizer switches for i386 compiler <br># -Os generate smaller code <br># -O1 level 1 optimizations (quick optimizations) <br># -O2 level 2 optimizations (-O1 + slower optimizations) <br># -O3 level 3 optimizations (same as -O2u) <br># -Oa=N set alignment to N <br># -OoX switch on optimalization X. <br># -OoNOX switch off optimalization X. <br># X is one of REGVAR UNCERTAIN STACKFRAME PEEPHOLE ASMCSE LOOPUNROLL <br># -OpCPU set target processor. <br># CPU is one of 386, PENTIUM, PENTIUM2, PENTIUM3, PENTIUM4, PENTIUMM <br> <br># ----------------------- <br># Set Filenames and Paths <br># ----------------------- <br> <br># Both slashes and backslashes are allowed in paths <br> <br># path to the messagefile, not necessary anymore but can be used to override <br># the default language <br>#-FrC:/lazarus/fpc/2.6.2/msg/errore.msg <br>#-FrC:/lazarus/fpc/2.6.2/msg/errorn.msg <br>#-FrC:/lazarus/fpc/2.6.2/msg/errores.msg <br>#-FrC:/lazarus/fpc/2.6.2/msg/errord.msg <br>#-FrC:/lazarus/fpc/2.6.2/msg/errorr.msg <br> <br># path to the gcclib <br> <br># searchpath for includefiles <br>#-Fi/pp/inc;/pp/rtl/inc <br> <br># searchpath for includefiles <br># release them only if you know what you do <br># because this could cause a rebuild of the runtime library <br># if you tell them compiler/ide to build the project (FK) <br>#-FiC:/lazarus/fpc/2.6.2/source/rtl/inc;C:/lazarus/fpc/2.6.2/source/rtl/i386 <br> <br># searchpath for objectfiles <br>#-FoC:/lazarus/fpc/2.6.2/source/rtl/inc;C:/lazarus/fpc/2.6.2/source/rtl/i386 <br><br><br><br><br><br></div><div class="gmail_extra"># Instead of Lazarus Windows directories , use your operating system Lazarus directories .....<br></div><div class="gmail_extra"># For example :<br># -Fu/usr/lib64/lazarus/lcl/units/x86_64-linux/<br></div><div class="gmail_extra"><br><br><br><br> <br>#IFDEF FPCAPACHE_1_13 <br>-FuC:/lazarus/fpc/2.6.2/units/$FPCTARGET/httpd-1.3/ <br>#ELSE <br>#IFDEF FPCAPACHE_2_0 <br>-FuC:/lazarus/fpc/2.6.2/units/$FPCTARGET/httpd-2.0 <br>#ELSE <br>-FuC:/lazarus/fpc/2.6.2/units/$FPCTARGET/httpd-2.2 <br>#ENDIF <br>#ENDIF <br> <br># searchpath for units and other system dependent things <br> <br>-FuC:/lazarus/fpc/2.6.2/units/$FPCTARGET/ <br>-FuC:/lazarus/fpc/2.6.2/units/$FPCTARGET/* <br>-FuC:/lazarus/fpc/2.6.2/units/$FPCTARGET/rtl <br> <br> -dLCL <br> <br> -dWin32 <br> -FuC:\LAZARUS\components\lazutils\lib\i386-win32\ <br> -FuC:\LAZARUS\lcl\units\i386-win32\win32\ <br> -FuC:\LAZARUS\lcl\units\i386-win32\ <br> <br># searchpath for libraries <br> <br>#-Fl/lib;/usr/lib <br> <br># searchpath for tools <br>-FDC:/lazarus/fpc/2.6.2/bin/$FPCTARGET <br> <br># binutils prefix for cross compiling <br>#IFDEF FPC_CROSSCOMPILING <br> -XP$FPCTARGET- <br>#ENDIF <br> <br><br><br><br><br><br><br><br><br><br># ------------- <br># Linking <br># ------------- <br> <br># generate always debugging information for GDB (slows down the compiling <br># process) <br># -gc generate checks for pointers <br># -gd use dbx <br># -gg use gsym <br># -gh use heap trace unit (for memory leak debugging) <br># -gl use line_ info unit_ to_ show_ more info for_ backtraces <br># -gv generates programs tracable with valgrind <br># -gw generate dwarf debugging info <br># <br># Enable debuginfo and use the line info unit by default <br>#-gl <br> <br># always pass an option to the linker <br>#-k-s <br> <br># Always strip debuginfo from the executable <br> <br>-Xs <br> <br># ------------- <br># Miscellaneous <br># ------------- <br> <br># Write always a nice FPC logo ;) <br> <br>-l <br> <br># Verbosity <br># e : Show_ errors_ (default) d : Show_ debug_ info <br># w : Show_ warnings_ u : Show_ unit_ info <br># n : Show_ notes t : Show_ tried/used files_ <br># h : Show_ hints m : Show_ defined_ macros <br># i : Show_ general info p : Show_ compiled_ procedures_ <br># l : Show_ line_ numbers_ c : Show_ conditionals_ <br># a : Show_ everything 0 : Show_ nothing ( except errors_ ) <br># b : Show_ all procedures_ r : Rhide/GCC compatibility mode_ <br># declarations if an error x : Executable info (Win32 only) <br># occurs <br># <br># Display Info, Warnings, Notes and Hints <br> <br>-viwnqb <br> <br># If you don't want so much verbosity use <br>#-vw <br> <br>#IFDEF NORMAL <br> <br> -TWin32 <br> -Sg <br> -Si <br> -Se1048576 <br># -Mfpc <br># -Mobjfpc <br> -Mdelphi <br> <br> -Ooregvar <br> -O1 <br> -Os <br> -OpPENTIUM <br> -Rintel <br>; -dNORMAL <br>; -dDELPHI <br>; -dVER130 <br># -gl <br> <br> -g- <br> -p- <br> -b- <br> <br> -uCONSOLE <br> <br>; -uLIST_INCLUDED_FILES <br> <br>#ENDIF <br> <br>#IFDEF DEBUG <br> -TWin32 <br> -Sg <br> -Si <br> -Sa <br> -Se10000 <br># -Mobjfpc <br> -Mdelphi <br> -Cr <br> -Ci <br> -Co <br> -CR <br> -Os <br> -OpPENTIUM <br> -Rintel <br> -gl <br> -p- <br> -b- <br>#ENDIF <br> <br>#IFDEF RELEASE <br> -TWin32 <br> -Sg <br> -Si <br># -Mobjfpc <br> -Mdelphi <br> -CX <br> -Ooregvar <br> -O2 <br> -Os <br> -OpPENTIUM <br> -Rintel <br> -XX <br> -Xs <br> -g- <br> -p- <br> -b- <br>#ENDIF <br> <br><br><br><br><br><br><br><br><br><br><br><br># Here , put your <br><br># -Fi .....<br><br># and<br><br># -Fu ..... <br></div><div class="gmail_extra"># -FU .....<br><br><br></div><div class="gmail_extra"># directories for your program *.lpr .....<br><br><br>-------------------------------------------------------------------<br><br><br></div><div class="gmail_extra">Copy /etc/fpc.cfg to your compilation directory to start from it .<br><br><br><br></div><div class="gmail_extra">If you do not use fpc from Lazarus installation , during compile , it may attempt to compile Lazarus units . In that case , install Lazarus into your home directory and , instead of using root installed Lazarus ( system-wide ) directories , use your local Lazarus directories to allow compilation of Lazarus units .<br><br></div><div class="gmail_extra">OR use fpc from Lazarus installation .<br><br><br><br></div><div class="gmail_extra">By using trial and error , you will be able to compile your *.lpr .<br><br><br></div><div class="gmail_extra">To write fpc command line compilation parameters , it may be sufficient to use <br></div><div class="gmail_extra"><br></div><div class="gmail_extra">fpc -help<br><br></div><div class="gmail_extra">or <br><br></div><div class="gmail_extra">Read <br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><a href="http://www.freepascal.org/docs-html/prog/prog.html">http://www.freepascal.org/docs-html/prog/prog.html</a><br></div><div class="gmail_extra"><a href="http://www.freepascal.org/docs-html/user/user.html">http://www.freepascal.org/docs-html/user/user.html</a><br><br></div><br><br><br></div>Mehmet Erol Sanliturk<br><div><br><div class="gmail_extra"><br><br><br><br><br><br><br><br><br><br><br><br><br><br></div></div></div>