Difference between revisions of "Lazarus Faq/hu"
Line 1: | Line 1: | ||
− | {{Lazarus Faq}} | + | { { Lazarus Faq } } |
− | <font size="7">Lazarus GY.I.K.</font> | + | <font size="7"> Lazarus GY.I.K. < / font > |
− | + | in progress ... | |
Line 10: | Line 10: | ||
− | == | + | == General == |
− | === | + | === Why is it so big the up binaries ? === |
− | + | The binaries are large because they debug information contain , which gdb (GNU Debugger ) is necessary to use . | |
− | + | The compiler has a switch which can be removed from the debugging information in the executable file (- Xs ), but because of an error ( 2.0.2 and earlier versions ) it will not work properly . The error been corrected has the compiler 2.0.4 and in future versions of . | |
− | + | You can use ' strip 'is a program the debug symbols to remove in the executable file. lazarus directory (for example, lazarus \ fpc \ bin \ i386- win32 \). | |
− | + | Just type the command " strip - strip -all <a_futtatható_fájl_neve_útvonallal> ". | |
− | + | If an even smaller you want your program size of , you can try [ http://upx.sourceforge.net/ UPX ] program. The UPX is a very good compression specifically executable files to compress . | |
− | It includes no memory overhead due to in-place decompression. | + | It includes no memory overhead due to in-place decompression . |
− | + | Very quickly compress the files (~ 10 MB / sec in a Pentium 133 machine). | |
− | + | The UPX hazsnálatához enter the command : " upx <a_futtatható_fájl_neve_útvonallal> ". | |
− | + | After each command ( strip and upx ) is finished, a Lazarus - VERSION made a simple GUI application size approx . many will be : | |
− | * ~ | + | * ~ 700KB on Linux |
− | * ~ 420kb Windows | + | * ~ 420kb on Windows |
− | + | A more detailed response to the UPX of using potential drawbacks also can be found here : [ [Size Matters ]]<!-- Size Problems -> ''( in English) .'' | |
− | + | It is important to note that Lazarus ' hello world ' example program already contains very many important component. Includes : | |
− | * XML | + | * XML handling library |
− | * | + | * Graphics library, png, xpm , bmp and ico files |
− | * | + | * Almost every widget - et the LCL out of ( Lazarus Component Library) |
− | * | + | * The total Free Pascal Runtime Library is |
− | + | Therefore it is very big, but it almost everything contains what a real world made and a major application may require. | |
− | + | The Lazarus produced by executable files large sizes start , but only slowly increasing, thanks to the Free Pascal compiler and the method as a lazarus windows operates . A c + + project ( just an example but other languages / tools is also true ), small size kezdődneka ' hello world ' , but size rapidly the many times increases when a need is the ingredients a serious application to write . | |
− | [[Image:Lazarus_vs_cpp_hu.png]] | + | [[ Image : Lazarus_vs_cpp_hu.png ]] |
− | ''' | + | ''' Quick guide to the Lazarus / FPC applications, reducing the size of ''' ''( tested with Lazarus 0.9.26 version of ) '' |
− | * 1 | + | * 1 "Project | Project Options | Compiler Options | Code | Smart Linkable (- CX) "-> True |
− | * 2 | + | * 2 "Project | Project Options | Compiler Options | Linking | Debugging | " all deleted except the " Strip Symbols From Executable (- Xs ) "- > True |
− | * 3 | + | * 3 "Project | Project Options | Compiler Options | Linking | Link Style | Link Smart (- XX) "-> True |
− | A | + | The most important element 2 A simple application , the executable file size 1-3 MB will be around 15 to 20 MB instead of . At this point, you could try this: "Project | Project Options | Compiler Options | Code | Optimizations | Smaller Rather Than Faster "-> True ( Warning : this may reduce the decreased interest ) |
− | * 4 | + | * 4 ( Or ) Run the " UPX <te_futtatható_programod> 'command the binary to compress of -2 or -3 parameter (Note : As above you can see , the UPX the use of may be drawbacks ). |
− | ''' | + | ''' Dimensions change in of a blank applications , settings and operating systems function ''' |
− | + | The testing versions: Lazarus 0.9.29 and FPC 2.4 ( on Windows FPC 2.2.4 ). for '' Optimized compiler '' the above advice means the application of '' UPX without the use of '' . The '' Default Lazarus '' and has as been installed a package / installer . the '' LCL Without debug informations '' meaning that the Lazarus IDE and LCL debugging information without (- g ) being rebuilt after . | |
− | < | + | <table WIDTH=642 BORDER=0 CELLPADDING=1 CELLSPACING=0> |
− | + | <TR Valign=top> | |
− | + | <TD WIDTH=263> < / TD > | |
− | + | <TD WIDTH=14> < / TD > | |
− | + | <TD WIDTH=111> Default Lazarus < / TD > | |
− | + | <TD WIDTH=14> < / TD > | |
− | + | <TD WIDTH=220> LCL Without debug informations < / TD > | |
− | + | < / TR > | |
− | + | <TR Valign=top> | |
− | + | <TD WIDTH=263> <U> Ubuntu 64 bits / Lazarus 64 bits < / U > < / TD > | |
− | + | <TD COLSPAN=4 WIDTH=372> < / TD > | |
− | + | < / TR > | |
− | + | <TR Valign=top> | |
− | + | <TD WIDTH=263> Default < / TD > | |
− | + | <TD WIDTH=14> < / TD > | |
− | + | <TD WIDTH=111> 13.4 Mb < / TD > | |
− | + | <TD WIDTH=14> < / TD > | |
− | + | <TD WIDTH=220> 7,5 Mb / 8 < / TD > | |
− | + | < / TR > | |
− | + | <TR Valign=top> | |
− | + | <TD WIDTH=263> Optimized compiler < / TD > | |
− | + | <TD WIDTH=14> < / TD > | |
− | + | <TD WIDTH=111> 4.4 MB < / TD > | |
− | + | <TD WIDTH=14> < / TD > | |
− | + | <TD WIDTH=220> 2.70 Mb ( 0.29svn FPC2.4 2.5) < / TD > | |
− | + | < / TR > | |
− | + | <TR Valign=top> | |
− | + | <TD WIDTH=263> < / TD > | |
− | + | <TD COLSPAN=4 WIDTH=372> < / TD > | |
− | + | < / TR > | |
− | + | <TR Valign=top> | |
− | + | <TD WIDTH=263> <U> Ubuntu 32 bits / Lazarus 32 bits < / U > < / TD > | |
− | + | <TD COLSPAN=4 WIDTH=372> < / TD > | |
− | + | < / TR > | |
− | + | <TR Valign=top> | |
− | + | <TD WIDTH=263> Default < / TD > | |
− | + | <TD WIDTH=14> < / TD > | |
− | + | <TD WIDTH=111> 19.6 Mb < / TD > | |
− | + | <TD WIDTH=14> < / TD > | |
− | + | <TD WIDTH=220> 5.7 MB < / TD > | |
− | + | < / TR > | |
− | + | <TR Valign=top> | |
− | + | <TD WIDTH=263> Optimized compiler < / TD > | |
− | + | <TD WIDTH=14> < / TD > | |
− | + | <TD WIDTH=111> 2.9 MB < / TD > | |
− | + | <TD WIDTH=14> < / TD > | |
− | + | <TD WIDTH=220> 1,6 Mb < / TD > | |
− | + | < / TR > | |
− | + | <TR Valign=top> | |
− | + | <TD WIDTH=263> < / TD > | |
− | + | <TD COLSPAN=4 WIDTH=372> < / TD > | |
− | + | < / TR > | |
− | + | <TR Valign=top> | |
− | + | <TD WIDTH=263> <U> Windows XP 32 bits / Lazarus 32 bits < / U > < / TD > | |
− | + | <TD COLSPAN=4 WIDTH=372> < / TD > | |
− | + | < / TR > | |
− | + | <TR Valign=top> | |
− | + | <TD WIDTH=263> Default < / TD > | |
− | + | <TD WIDTH=14> < / TD > | |
− | + | <TD WIDTH=111> 11.8 Mb < / TD > | |
− | + | <TD WIDTH=14> < / TD > | |
− | + | <TD WIDTH=220> 2.14 Mb < / TD > | |
− | + | < / TR > | |
− | + | <TR Valign=top> | |
− | + | <TD WIDTH=263> Optimized compiler < / TD > | |
− | + | <TD WIDTH=14> < / TD > | |
− | + | <TD WIDTH=111> 1.62 Mb < / TD > | |
− | + | <TD WIDTH=14> < / TD > | |
− | + | <TD WIDTH=220> 1.50 Mb < / TD > | |
− | + | < / TR > | |
− | + | <TR Valign=top> | |
− | + | <TD WIDTH=263> < / TD > | |
− | + | <TD COLSPAN=4 WIDTH=372> < / TD > | |
− | + | < / TR > | |
− | + | <TR Valign=top> | |
− | + | <TD WIDTH=263> <U> Windows Seven 64 bits / Lazarus 64 bits < / U > < / TD > | |
− | + | <TD COLSPAN=4 WIDTH=372> < / TD > | |
− | + | < / TR > | |
− | + | <TR Valign=top> | |
− | + | <TD WIDTH=263> Default < / TD > | |
− | + | <TD WIDTH=14> < / TD > | |
− | + | <TD WIDTH=111> 12.3 Mb < / TD > | |
− | + | <TD WIDTH=14> < / TD > | |
− | + | <TD WIDTH=220> 3.20 Mb < / TD > | |
− | + | < / TR > | |
− | + | <TR Valign=top> | |
− | + | <TD WIDTH=263> Optimized compiler < / TD > | |
− | + | <TD WIDTH=14> < / TD > | |
− | + | <TD WIDTH=111> 2.14 Mb < / TD > | |
− | + | <TD WIDTH=14> < / TD > | |
− | + | <TD WIDTH=220> 2.16 Mb < / TD > | |
− | + | < / TR > | |
− | </TABLE> | + | < / TABLE > |
− | === | + | === Why is slow the applications build on Windows ? === |
− | + | This error was corrected in the FPC 2.2 and the Lazarus 0.9.24 versions . upgrade the Lazarus was . Older versions in relation to , read the following text. | |
− | + | Generally speaking, the translation time on Windows takes more time than other systems because the GNU linker, which the Free Pascal uses is slow on this system. This phenomenon only on Windows exists , and only the older machine ( 1Ghz under ) and low memory (128MB or less) event disruptive . | |
− | + | In addition , if the LCL the ' SmartLink ' switch, use then the merge much slower will be . A description of this can be found here : [ [File size and smartlinking ] ]'' (in English - in preparation) '' | |
− | + | An internal lacing ( linker ) has been developed , but the Free Pascal 2.2 Starting with version will be available (of course, SVN from also available ). Dramatically reduces the stacking time of . | |
− | ''' | + | '' 'Note ''' : The 2.1.1 version on Windows an internal lacing uses which is a bit faster. the same újrafordított Lazarus about . 280MB per occupies . |
− | === | + | === Which one do I need : ppc386.cfg or fpc.cfg ? === |
− | + | Only fpc.cfg be you. Thus, the compiler knows the location of the libraries . | |
− | === | + | === How compile to lazarus - t ? === |
− | + | Like this: | |
− | + | $ Cd lazarus | |
− | + | $ Make clean all | |
− | === | + | === How can I build other projects , which LCL - en the are based on ? === |
− | + | If you do not use the IDE to compile , use the ' lazbuild ' program. This is a command-line version of the IDE 's , Lazarus projects and packages for the construction . | |
− | + | If the LCL application of the IDE and the lazbuild without want to prepare , add following lines to the '' fpc.cfg '' file : | |
− | + | # SearchPath for Other Toolkits (Linux ) | |
− | + | -Fu/usr/lib/fpc / $ fpcversion /units / $ fpctarget / { Stocks } | |
− | + | # SearchPath for Other Toolkits ( Windows) | |
− | + | Fu / { LazarusKönyvtárad } / components / units / { Stocks } | |
− | : | + | : Where { the Pools } include: '' gtk2 '' ,'' gnome '' ,'' qt '' or '' win32 '' . After this, run this command: |
− | ::ppc386 projekted.pp | + | :: ppc386 projekted.pp |
− | ''' | + | '' 'Note : ''' Do not forget to install the development packages for your kit , otherwise a like this message you may get : ' [[ Linker message : can not find -l/hu | Linker message : can not find- l ] ] ' . |
− | === | + | === Which FPC version do I need? === |
− | + | Lazarus 0.9.28 at least of the FPC 2.4 version requires . | |
− | === | + | === I can not pay the Lazarus- t === |
− | # | + | # Make sure the compiler as with the version use |
− | # | + | # Check that the libraries ( FPC) do the same to to the version |
− | # | + | # Check that the compiler installation path name if there are spaces . Do not be ! |
− | # | + | # Make sure there is fpc.cfg file and there is no old ppc386.cfg |
− | # | + | # Look through the operating system related FAQs is |
− | === | + | === When you a project translate , an error message I get === |
− | ==== " | + | ==== " Can not find Unit interfaces . " How to solve ?==== |
− | + | This means that the compiler can not find ' interfaces.ppu 'file ''' or ''' means that it found but is incorrect (old ). | |
− | + | This unit can be found in the " { LazarusDir } \ LCL \ units \ { TargetCPU } - { TargetOS } \ { LCLWidgetSet } \ interfaces.ppu route . For example : "/ home/username/lazarus/lcl/units/i386-linux/gtk/interfaces.ppu ". | |
− | + | Check that only there is . If multiple versions there are interfaces.ppu file , you're probably bad options (such as adding a LCL library search path ). Delete the interfaces.ppu all copies of , except for one of the above directory. | |
− | + | If any other window panel set ( widgets ), have chosen as we the Lazarus made , you must build the LCL is to the window panel set . | |
− | + | If it is there , but still this error message get if a different compiler / rtl are using your project to compile , as we in the Lazarus IDE made . One of the following do : | |
− | * | + | * Rebuild the LCL ( , or the whole Lazarus - t) " Environmnent Options " between the selected compiler. You can do this in the "Tools | Build Lazarus "menu item . Before that check the settings in the "Tools | Configure Build Lazarus " clicking . |
− | * | + | * Change the selected compiler the "Environment Options " between the it one with which Lazarus was compiled . Carefully look at the "Environment Options " , so that the correct path is set to " Lazarus Directory "and the " FPC sources directory "box. Check to only one version of be the compiler configuration fpc.cfg file - its place in the directory / etc / Linux / Unix systems or Windows , the of the directory where the FPC compiler is located. Try to run the " fpc -vt bogus 'command to ellenőrizhesd which fpc.cfg is used in the system. Redundant copies may remain when a new version update the compiler and these are the user directory or in the directory can be where the new compiler built. DELETE THEM ! |
− | * | + | * You may change the project selected window panel set. An example: the " objectinspector " is the Lazarus part of the default gtk is set to . This translation of certainly causes a " Can not find unit interfaces " message on Windows. The ablakelemek converting "default (Win32 ) "to solve the problem: "Project | Project Options | Compiler Options ... | LCL Widget Type ( various ) ". |
− | === | + | === When a Delphi project to you want to compile Lazarus fiber, an error message I get === |
− | ==== at the line :{$R *.DFM} | + | ==== at the line : { $ R *. DFM } How can I solve this problem? ==== |
− | + | Lazarus ( or rather, Linux) do not know the sources of data ( resources ) , in the form as Delphi/Win32 use . Therefore, Lazarus another -up method that is roughly equivalent to him. You can use the Delphi ablakelrendezéseket (. dfm ) files with the following steps : | |
− | * | + | * Do you need to . dfm files to text version . The D5 and newer versions such made default. If older files there are : { { keypress | Alt | F12 } } to text see then copy /insertion. If the text . dfm file, only copy one . LfM file. |
− | * | + | * Create a file in the lazres program ( lazarus / tools directory) : lazres formod.lrs formod.lfm |
− | *Add | + | * Add the following lines to the " initialization " section : |
− | + | initialization | |
− | + | { $ I formod.lrs } | |
− | + | not all property (Property ) supported by Lazarus , which the . dfm files may occur , and it may crash. | |
− | + | Edit : the FPC 2.4.0 Since , a Delphi -style data sources are supported , so you have nothing to be changed. <! - Even Lazarus svn Already uses it as default projects . - > Note : I recommend the Lazarus Delphi project converter use of , since there may not be supported properties . | |
− | ==== 'Identifier not found LazarusResources'. ==== | + | ==== ' Identifier not found LazarusResources ' . ==== |
− | + | When Lazarus set up a form was , add a few Unit is united uses part of the . However, Delphi Units Lazarus unittá converting it it does not happen. Therefore, you should add the LResources United in the form unitjának uses part of the . | |
− | === | + | === When an object event handler I call , eg . a button on onclick () -jet then the following error message I get : ' ERROR unit not found: stdCtrls ' === |
− | + | Check the " Project | Project Inspector " in that the projects ' LCL ' packets based on and to install the FPC source code . | |
− | + | Lazarus in the development environment ( IDE ) and the LCL visual components combination of . | |
− | + | Each other , as the IO, the Database , the FCL and RTL the FPC by is provided . | |
− | + | The IDE requires all the source path . | |
− | + | The FPC source code path set menu starting from a : Environment | Environment Options | Files | FPC source directory " | |
− | === | + | === How can I build a small file with a executable file that is not a separate file ? How can I build a resource ? === |
− | + | For example : | |
− | + | / lazarus / path / tools / lazres sound.lrs sound1.wav sound2.wav ... | |
− | + | Creates the sound.lrs file the sound1.wav and sound2.wav files using . | |
− | + | Then paste the code in the form . LRS * after *: | |
− | + | ... | |
− | + | initialization | |
− | + | { $ i unit1.lrs } / / this is the main resource file (first) | |
− | + | { $ i sound.lrs } / / user defined resource file | |
− | + | ||
− | + | end . | |
− | + | Your program so you can use : | |
− | + | Sound1AsString : = LazarusResources.Find (' sound1 ') . Value ; | |
− | === | + | === What are the different types of files you the Lazarus are using ? === |
− | + | The [[ Lazarus Tutorial # The Lazarus files ]] article in detail , with examples describe the type of file extensions. | |
− | + | This is a summary list: | |
− | ; <code>*.lpi</code> : Lazarus Project | + | ; <code> *. lpi < / code >: Lazarus Project Information File ( XML format , includes the project specific settings) |
− | ; <code>*.lpr</code> : Lazarus Program | + | ; <code> *. lpr < / code >: Lazarus Program files ; the main program Pascal source code included in |
− | ; <code>*. | + | ; <code> *. LfM < / code >: Lazarus Form file , information contains a form all the elements of ( unique to the Lazarus used by text format is ; operations Pascal source code written in the appropriate <code> *. pas < / code> file found) |
− | ; <code>*.pas</code> | + | ; <code> *. pas < / code > or <code> *. pp < / code >: Pascal source Unit (typically a form to belongs in which the data the corresponding <code> *. LfM < / code> file) |
− | ; <code>*. | + | ; <code> *. LRS < / code >: Lazarus Resource File ( resource , this is a generated file , do not be confused with the Windows resource files ). |
− | : | + | : If these files are lazres ( Lazarus / Tools directory) tool to create from the command line started : lazres fajlom.lrs fajlom.lfm |
− | ; <code>*. | + | ; <code> *. PPU < / code >: Compiled |
− | ; <code>*. | + | ; <code> *. LPK < / code >: Lazarus package ( package ) information file . (XML format , the package specific settings includes ) |
− | === | + | === When a text file declared so : '' var mytext : text ; '', an error message I get : " Unit1.pas ( 32.15 ) Error : Error in type definition ". How can I improve ? === |
− | + | The TControl class ( class ) has a [[ doc: LCL / controls / tcontrol.text.html | Text] ] , a property (property ). a form belonging to process ( method ) should availability of take precedence over the System units located in [[ doc: rtl / system / text.html | Text] ] model comparison . You can use [[ doc: rtl / system / textfile.html | textfile ]] model , which is an alias the text type for , or the type is set, the type name before can write the unit his name. | |
− | + | var | |
− | + | MyTextFile : TextFile ; | |
− | + | MyText : System.Text ; | |
− | + | A similar phenomenon may occur in a text file identifiers, assigning and close the file too. The TForm in '' assign '' and [ [ doc: LCL / forms / tcustomform.close.html | Close ]] procedure ( method ) as well. You can use [[ doc: rtl / objpas / assignfile.html | AssignFile ]] and [ [ doc: rtl / objpas / closefile.html | CloseFile ]] procedures , or insert the '' System '' unit name of the . | |
− | === | + | === an error message I get when a Printer.BeginDoc cent using === |
− | + | the printers Units need to add to the uses section. | |
− | + | The Printer4Lazarus package need to add your project függősdégeihez ( Requirement ) the IDE menu in starting from a : | |
− | "Project|Project Inspector|Add|New Requirement|Package Name: | + | "Project | Project Inspector | Add | New Requirement | Package Name : |
− | + | Printer4Lazarus package is not the box, when you open you must install . of the package is part of the Lazarus installation and can be found in this directory : | |
− | "[ | + | " [ Lazarus Install Directory ] \ components \ printers " |
− | + | If the default installation directory you used is in the [ lazarus Install Directory ] | |
− | *Windows: c:\lazarus | + | * Windows: c: \ lazarus |
− | *Linux: /usr/lib/lazarus | + | * Linux : / usr / lib / lazarus |
− | + | The same solution used when Printer.Printers for reference exception ( Exception ) is formed . | |
− | === | + | === Why is equal the TForm.ClientWidth / ClientHeight and TForm.Width / Height === |
− | + | The TForm.Width / Height does not include the frame, as it was not possible to retrieve the frame size of each system. a reliable method Without of LCL abnormally mozgathatná or indefinitely átméretezhetné the windows on the screen. | |
− | + | However, if there will be a reliable procedure for a window and frame size , and status of query the all systems , then it will change . The older LCL form- reason compatibility with in order to maintain the new version of some other process ( method ) as well will be added . | |
− | == | + | == Debugger ( Debugger ) == |
− | === | + | === How can I see debugging output? === |
− | + | LCL contains two procedures for LCLProc unit the debug output to writing . These are: | |
− | * '''DebugLn:''' | + | * ''' DebugLn : ''' works like writeln , but string parameters. |
− | * '''DbgOut:''' | + | * ''' DbgOut : ''' works such as Write, but string parameters. |
− | + | Under normal circumstances, the output stdout is . If is stdout closed ( for example, when the application is { $ AppType Gui } or - WG options has been compiled on Windows) , it will not be writing to the output. | |
− | + | The debug output file is writable. The LCLProc unit the initialization section of checks the Lazarus.exe command parameters of the '- debug -log = <file> 'to search . If find you can additional debug output the <file> into will be written . | |
− | + | If not specified the '- debug -log ' command line parameter , an xxx_debuglog named environment variable the existence verify of the operating system , where xxx is the executable name of the without the extension. The Lazarus for it lazarus_debuglog . | |
− | + | If such an environment variable exists, then it is converted file will be used the debug output data written to to save . | |
− | + | For example : if you do : | |
− | + | set lazarus_debuglog = c: \ lazarus \ debug.txt | |
− | + | the debug output c: \ lazarus \ debug.txt file will be written . | |
− | + | Every application that uses the lclproc units, you can use this option. | |
− | ;Lazarus | + | ; Lazarus Debugging : The most useful method is Windows at the console to use output , this add to the { $ APPTYPE console } directive the lazarus.pp to , then rebuild, the Lazarus- t . |
− | === | + | === How to monitor your properties? (property ) === |
− | + | The latest development (2.5.1 ) or the 2.4 version instead. | |
− | + | If the application on - gw ( dwarf debug info ) to compile , then observed the properties. | |
− | + | It should be noted that this is a of the character true that directly variables embody ( the "read " declaration of the class a members show and the is not a function ). | |
− | + | If the property an operation outcome of returns the is very dangerous their evaluation / monitoring . May be necessary to carry out the operation , and this can sometimes variables the value of change in lead to . Put simply change the your application status of in the debugger , and a further code execution , debuggers or monitoring is invalid findings. | |
− | + | The facility the processes return value of the monitor ( to the above risks in addition ) , and because of this code call the Debugger out is not yet developed . | |
− | === | + | === Why does not shows the debugger the individual variables / structures (" No such symbol " / " incomplete type " ) === |
− | + | The following troubleshooting problems: <br> | |
− | - | + | - properties (property - k ) <br> |
− | - array of ... ( | + | - array of ... (dynamic arrays ) <br> |
− | - | + | - variables nested procedures <br> |
− | - " | + | - " No such symbol in context "<br> |
− | - "incomplete type"<br> | + | - " incomplete type " <br> |
− | + | Read this article : [[ GDB Debugger Tips ] ]'' (in English ) '' | |
− | === | + | === How do I use the debugger , packs and FCL components Lazarus VERSION === |
− | + | The FCL components and classes by default debugging information without have been compiled with and therefore gdb can not access the methods and properties. The components packages need to be rebuilt of the " gl " option. | |
− | + | The following example assumes that is a Linux compilation using the / usr / local / installation path and the FCL -db database administrator package in the which should include debugging information . In the example FCL - piece in , but mind simply any other package is works. | |
− | + | Before you begin , you have to find the FPC configuration file : / etc / fpc.cfg . Look through the contents and find the the FPC installation path of . Search the fpc.cfg file a line with the early -Fu in : | |
− | + | -Fu/usr/local/lib/fpc / $ fpcversion / units / $ fpctarget / * | |
− | + | the Make scripts by compiled United in the INSTALL_PATH / lib / fpc / $ fpcversion / units / $ fpctarget / directory, so have to make sure that the installation path to / usr / local , and must be reported INSTALL_PREFIX as , otherwise the Make translated by Units a location can be placed in where you do not belong or to the Make scripts error due to down also may . | |
− | '''1. | + | '' '1 . Step ''' : Open a terminal window <br> |
− | '''2. | + | '' '2 . Step ''' cd / user/local/share/src/fpc-2.3.1/fpc/fcl-db / <br> |
− | '''3. | + | '' '3 . Step ''' sudo make clean all install INSTALL_PREFIX = / usr / local OPT =- gl <br> |
− | + | ||
− | + | Note that the INSTALL_PREFIX parameter be properly adjusted to the Units proper placement of in order ! | |
− | + | In this example, / usr / local the default install path on Linux, but other operating systems may be different . | |
− | + | make clean all install INSTALL_PREFIX = / usr / local OPT =- gl | |
− | + | Finally, any of the FCL unit after recompiling may need to the LCL recompile is the same way. | |
− | == | + | == Contribution / Correction the Lazarus in == |
− | === | + | === I made a patch (patch ), which the IDE Messages ( Messages ) window in the Source Editor ( Source Code Editor ) to the bottom attached === |
− | + | These foltozásokat not be used because of the windows you want to join the way only a small part of are designed they . The goal is to complete Recording Management System the preparation and use of . is a complete Recording Management System for IDE all windows to be linked to user-defined way . For example, the message window of the source code editor above or below or ... or anything anywhere. Sample: | |
<pre> | <pre> | ||
+-------------------++--+ | +-------------------++--+ | ||
− | | | + | | Menu | | | |
− | +-------------------+| | + | +-------------------+| | |
− | +--++---------------+| | + | +--++---------------+| | |
− | |PI|| | + | | PI | | Source Code | | CE | |
− | +--+| | + | +--+| Editor | | | |
− | +--+| | + | +--+| | | | |
− | | | + | | |+---------------++--+ |
− | |OI|+-------------------+ | + | | OI |+-------------------+ |
− | | | + | | | | Messages | |
+--++-------------------+ | +--++-------------------+ | ||
− | </pre> | + | < / pre > |
− | + | The Recording Management can save the layout and restore to the next boot . <! - Preferably the dock manager can dock in pages too . -> The rögzítéskezelőnek no need the drag and drop method to use . | |
− | + | all tinkering with that Recording Management without , turn up the windows , makes it difficult a Recording Management to develop and is denied . | |
− | + | A temporary solution you can use this supplement to the IDE : [[ Manual Docker ]] | |
− | === | + | === repaired / improved my Lazaruszon . How do I add the changes to the official lazarus source ? === |
− | + | Make a patch ( patch) and send it to developers. Details can be found here : [[ Creating A Patch] ]. ''( in English) '' | |
− | === | + | === How do I become a Lazarus developer , the SVN and the bug (bug -tracker ) Manager ? === |
− | + | Above all : learn to Lazarus about , thereby increasing their knowledge and expertise. Start with the [[ Lazarus_Documentation / en | wiki articles ]] read , read the Lazarus source code , take some look at a [ http://www.lazarus.freepascal.org/mantis Lazarus Bug Tracker ] , correct some mistakes , and if you think you're ready, please contact the developers of the [ http://www.mail-archive.com/lazarus @ miraclec.com mailing list ]. | |
− | == | + | == Where are the ... DEFINITIONS == |
− | === | + | === Virtual key constants === |
− | + | The virtual key constants in the [[ doc: LCL / lcltype | LCLType ]] unit are defined . Add <b> uses < / b > section of the LCLtype unit. | |
− | == | + | == The IDE use of == |
− | === | + | === How do I use the " Code Completion " (" identifier Completion ") option ? === |
− | + | The identifiers in addition to { { keypress | ctrl | spaces } } Press are available. You can set the auto-completion delayed is , from the menu starting : ' Environment | Editor Options | Code Tools | Automatic Features ' . | |
== Linux == | == Linux == | ||
− | === | + | === How do I use the debugger the IDE without ? === |
− | <! | + | <! - |
− | First of all you need a debugger. gdb is the standard debugger under | + | First of all you need a debugger. gdb is the standard debugger under Linux and |
− | there are | + | there are Several GUI frontends available. One common frontend is ddd , Which is |
− | part of | + | part of now common distributions . To compile Lazarus / LCL with debugging information |
− | you | + | you Should then use the FOLLOWING commands to start the debug session : |
− | + | $ Make clean; make OPT =- dDEBUG | |
− | + | $ ddd lazarus | |
− | + | you warn however , That ddd Is Not as comfortable as eg The Lazarus debugger. | |
− | Specially if it comes to view the contents of | + | Specially if it comes to view the contents of the variable you have to take into |
− | account | + | account That ddd / gdb are case sensitive Having Pascal is case-insensitive . |
− | Therefore you have to type all variable names in uppercase to see | + | Therefore you have to type all variable names in uppercase to see Their |
− | contents. For more information take a look into the fpc-manuals. | + | contents . For more information take a look into the fpc - manuals . |
− | + | -> | |
− | === | + | === Can I run the debugger , but ddd can not find the forráskódjaimat , or complain that they have no code . What is this ? === |
− | <! | + | <! - |
− | This is | + | This is the path- related problem with either has gdb or ddd . You Can Avoid this by |
− | * Use the "Change | + | * Use the "Change Directory "command from the ddd menu and choose the directory WHERE the sources are located . The drawback of this method Is that you now can not use the source of the program you started with ( eg Lazarus) . Thus it May in neccessary to change the directory multiple times. |
− | * In ddd goto [Edit] [gdb-settings] and set the search-path | + | * In ddd goto [Edit ] [ gdb -settings ] and set the search -path |
− | * Create | + | * Create the $ ( HOME) / . gdbinit file like: |
− | + | directory / your / path / to / lazarus | |
− | + | directory / your / path / to / lazarus / LCL | |
− | + | directory / your / path / to / lazarus / LCL / include | |
− | + | -> | |
− | === | + | === an error message I get the merge during , which says "/ usr / bin / ld can not find- l <valami_lib> " === |
− | <! | + | <! - |
− | ; '''Package Based Distributions''' : You need to install the package | + | ; ''' Package Based Distributions ''' : You need to install the package That provides the lib <somelib> . so or lib <somelib> . the files. Dynamic libs under linux have the extension . so , while static libs have the extension. a. On some Linux distro's you have installed the package ( rpm, deb) <packagename> Which provides <some lib> , But you Also need the development package ( rpm, deb) , Normally Called <packagename> - dev, Which contains the. a ( static lib ) and / or the. so ( dynamic lib ). |
− | : Some distributions have commands to find | + | : Some distributions have commands to find Which package contains a file: |
− | : '''Mandriva''' | + | : ''' Mandriva ''' |
− | + | [ ] $ urpmf lib <somelib> . so | |
− | + | Will list all packages containing the files named lib <somelib> . so , you'll have to install thos ending in- devel | |
− | : '''Debian''' | + | : ''' Debian ''' |
− | :install the apt-file utility (apt-get install apt-file) then | + | : install the apt -file utility (apt - get install apt -file ), then |
− | + | [ ] $ apt -file search lib <somelib> . so | |
− | + | Will list all packages containing the files named lib <somelib> . so , you'll have to install thos ending in- dev | |
− | + | ||
− | ; '''Source Based Distributions and Manual Compilation (LFS)''' : Make | + | ; '' 'Source Based Distributions and Manual Compilation (LFS )''' : Make That there is a lib <somelib> . for in the path, and That it contains the right version. To let the linker find the dynamic library , create a symlink Called lib <some lib> . so to lib <some lib> <version> -x, y.so if Necessary (and / or for static lib , lib <some lib> . the to lib <some lib> <version> - x , y ). |
− | ; '''FreeBSD''' : As source based distro's, and | + | ; ''' FreeBSD ''' : As source based distro 's, and bottom make sure you have -Fl/usr/local/lib in your fpc.cfg and / or Lazarus library path . Keep in Mind That GTK1.2 has " gtk12 "as package name under FreeBSD . ( Same for glib ) NOTE : This has changed as of late . Newest ports have gtk -12 and glib -12 as well . might Stumble on this problem , Since FPC Requires the " -less " ones , You will need to symlink Them like this : |
− | + | [ ] # cd / usr / local / lib & & ln -s libglib - 12.so libglib12.so | |
− | + | [ ] # cd / usr/X11R6/lib & & ln -s libgtk - 12.so libgtk12.so | |
− | + | [ ] # cd / usr/X11R6/lib & & ln -s libgdk - 12.so libgdk12.so | |
− | ; '''NetBSD''' : As source based distro's, and | + | ; ''' NetBSD ''' : As source based distro 's, and bottom make sure you have -Fl/usr/pkg/lib in your fpc.cfg and / or Lazarus library path |
− | + | -> | |
− | === | + | === How do I convert Kylix 2 projects Lazarus project? === |
− | <! | + | <! - |
− | Nearly the | + | Nearly the Same way as converting a Kylix project into a Delphi / VCL project . |
− | The LCL (Lazarus Component Library) | + | The LCL ( Lazarus Component Library) Triest to be compatible to Delphi 's VCL . |
− | Kylix's CLX | + | Kylix 's CLX Triest to be QT compatible . |
− | Here are some general hints: | + | Here are some general hints : |
− | * Rename all used CLX Q-units like QForms, QControls, QGraphics | + | * Rename all used CLX Q - units like QForms , QControls , QGraphics ... into Their VCL counterparts : Forms , Controls , Graphics , ... |
− | * Add LResources to the uses section of | + | * Add LResources to the uses section of Every form source |
− | * Rename or copy all . | + | * Rename or copy all . XFM files to. LfM files. |
− | * Rename or copy . | + | * Rename or copy . DPR file to. lpr file . |
− | * Add "Interfaces" to the uses section in the .lpr file. | + | * Add " Interfaces "to the uses section in the . lpr file . |
− | * Remove {$R *.res} directive | + | * Remove { $ R *. res } directive |
− | * Remove {$R *. | + | * Remove { $ R *. XFM } directive |
− | * Add {$mode objfpc}{$H+} or {$mode delphi}{$H+} directive to .pas and .lpr files | + | * Add { $ mode objfpc } { $ H +} or { $ mode delphi } { $ H +} directive to. pas and. lpr files |
− | * Add an initialization section to the end of | + | * Add an initialization section to the end of Each form source and add an include directive for the. LRS file ( lazarus resource file) : |
− | + | initialization | |
− | + | { $ I unit1.lrs } | |
− | :The . | + | : The. LRS files can be created via the lazres tool in ( lazarusdir ) / tools / lazres . |
− | :For example: ./lazres unit1.lrs unit1.lfm | + | : For example :. / lazres unit1.lrs unit1.lfm |
− | * Fix the | + | * Fix the Differences . The LCL does not yet support Every property of the VCL and the CLX is Not Fully VCL compatible . |
− | * To make it more platform independant, | + | * To make it more platform independant , Reduce unit libc ( Which is deprecated ) references and Substitute with native FPC units like baseunix / unix as much as possible . This Will Be Necessary to support Other targets Than Linux/x86 ( including OS X , FreeBSD and Linux/x86_64 ) |
− | + | -> | |
− | === | + | === When Lazarus was translating the compiler can not find a unit. pl . " gtkint.pp ( 17.16 ) Fatal : Can not find unit GLIB " === |
− | <! | + | <! - |
− | 1. Check | + | 1. Check the clean rebuild : do a ' make clean all ' |
− | 2. Check if the compiler has the correct version (2.0.4 or higher) | + | 2. Check if the compiler has the correct version ( 2.0.4 or higher ) |
− | 3. Check if the compiler is using the right config file. The normal installation | + | 3. Check if the compiler is using the right config file . The normal installation Creates / etc / fpc.cfg . But fpc lower searches for ~ / . ppc386.cfg , ~ / . fpc.cfg , / etc/ppc386.cfg and it uses only the first it Finds . |
− | :'''Hint:''' You can see | + | : ''' Hint : ''' You can see Which config file is used with ' ppc386 -vt bogus ' |
− | :Remove | + | : Remove Any ppc386.cfg as it is really obsolete . |
− | 4. Check if the config file (/etc/fpc.cfg) contains the right paths to your fpc libs. There must be three lines like this: | + | 4. Check if the config file (/ etc / fpc.cfg ) contains the right paths to your fpc libs . There must be three lines like this : |
− | + | -Fu/usr/lib/fpc / $ fpcversion / units / $ fpctarget | |
− | + | -Fu/usr/lib/fpc / $ fpcversion / units / $ fpctarget / rtl | |
− | + | -Fu/usr/lib/fpc / $ fpcversion / units / $ fpctarget / * | |
− | :The first part of | + | : The first part of THESE paths (/ usr / lib / fpc ) depends on your system . On some systems this can be for example / usr / local / lib / fpc / ... . |
− | :'''Hint:''' You can see your searchpaths with 'ppc386 -vt bogus' | + | : ''' Hint : ''' You can see your searchpaths with ' ppc386 -vt bogus ' |
− | 5. Check that the config file (/etc/fpc.cfg) does not contain search paths to the | + | 5. Check that the config file (/ etc / fpc.cfg ) does not contain search paths to the LCL source files (. pp . pas ): |
− | + | forbidden :- Fu ( lazarus_source_directory ) / LCL | |
− | + | forbidden :- Fu ( lazarus_source_directory ) / LCL / interfaces / gtk | |
− | :If | + | : If You Want to enter the LCL for all your fpc projects , make sure That the two paths look like the FOLLOWING and are place after the Above fpc lib paths: |
− | + | -Fu ( lazarus_source_directory ) / LCL / units / $ fpctarget | |
− | + | -Fu ( lazarus_source_directory ) / LCL / units / $ fpctarget / gtk | |
− | 6. Check if the missing unit (glib.ppu) exists in your fpc lib directory. For example the gtk.ppu can be found in /usr/lib/fpc/$fpcversion/units/i386-linux/gtk/. If it does | + | 6. Check if the missing unit ( glib.ppu ) exists in your fpc lib directory . For example the gtk.ppu can be found in / usr / lib / fpc / $ fpcversion/units/i386-linux/gtk / . If it does NOT EXISTS , the fpc lib is corrupt and Should Be reinstalled . |
− | 7. Check if the sources are in | + | 7. Check if the sources are in the NFS mounted directory . In some Cases the NFS updates created files incorrectly . Please, try to move the sources into a non NFS directory and compile there. |
− | 8. If you are | + | 8. If you are Still Not succeeded try to use samplecfg script as follows : |
− | ''#'' cd /usr/lib/fpc/''version''/ | + | ''#'' cd / usr / lib / fpc / '' version ''/ |
− | ''#'' sudo ./samplecfg /usr/lib/fpc/''\$version'' /etc | + | ''#'' sudo. / samplecfg / usr / lib / fpc / '' \ $ version '' / etc |
− | Note! | + | Note! DO NOT PUT - / - after etc. Because if you do that the system Will create a file - / etc / fpc.cfg / fpc.cfg . In FACT we Want That samplecfg Make the file - / etc / fpc.cfg - not the folder / etc / fpc.cfg . |
− | + | -> | |
− | === | + | === the binary version I installed , but a simple project for translating the Lazarus writes: ' Fatal : Can not find unit CONTROLS ' === |
− | + | likely to more FPC package use more than I the Lazarus binaries made in . The best solution is to source code download and Lazarus recompile . You can download the latest source code ( snapshot) or you can use the svn system : | |
− | + | $ bash | |
− | + | $ svn checkout http://svn.freepascal.org/svn/lazarus/trunk lazarus | |
− | + | $ Cd lazarus | |
− | + | $ Make clean all | |
− | + | Please check that the Lazarus to is - e given the source directory new path , from the menu starting : | |
− | "Environment->General Options->Files->Lazarus Directory Top" | + | "Environment -> General Options-> Files -> Lazarus Directory Top " |
− | === | + | === The Lazarus translated , but the concatenation fails with ' libgdk - pixbuf not found ' === |
− | + | Install the gdk - pixbuf library for gtk1.x to : | |
− | + | The gdk - pixbuf library can be found at the following locations : | |
− | + | RPMs : | |
− | http://rpmfind.net/linux/rpm2html/search.php?query=gdk-pixbuf&submit=Search+...&system=&arch= | + | http://rpmfind.net/linux/rpm2html/search.php?query=gdk-pixbuf&submit=Search+...&system=&arch = |
− | Debian | + | Debian packages: |
− | libgdk-pixbuf-dev | + | libgdk - pixbuf - dev |
− | + | Source : | |
ftp://ftp.gnome.org/pub/gnome/unstable/sources/gdk-pixbuf/ | ftp://ftp.gnome.org/pub/gnome/unstable/sources/gdk-pixbuf/ | ||
− | + | External Links: | |
− | [http://www.besttermpaper.com/ termpapers] | + | [ http://www.flashpapers.com/ term papers writing service ] |
+ | [ http://www.besttermpaper.com/ termpapers ] | ||
− | '''Ubuntu 8.10:''' | + | ''' Ubuntu 8.10 : ''' |
− | + | If Lazarus was GTK 2-0 version compiled an error message you will get that the " libgdk - pixbuf2.0 "was not found . Just install the libgtk2.0 - dev package apt with like this: | |
− | + | apt - get install libgtk2.0 - dev | |
− | ===SuSE | + | === SuSE system, this I get : '/ usr / bin / ld : can not find- lgtk Error : Error while linking ' === |
− | + | Older SuSE versions of (SuSE 11 before ) to install the gtk development libraries to / opt / gnome / lib (or / opt/gnome/lib64 64- bit system ) directory , which is not the standard location the libraries for . Add the directory / etc / fpc.cfg to ( -Fl/opt/gnome/lib ). | |
− | === | + | === The Lazarus crashes ' runtime error 211 ' error after a component I installed === |
− | + | a component After installing on Lazarus crash with this message: | |
− | + | threading Has Been used Before cthreads WAS initialized . | |
− | + | Make cthreads one of the first units in your uses clause . | |
− | + | Runtime error 211 at $ 0066E188 | |
− | + | How to fix ? | |
− | + | the Fiss installed component fibers ( threads) are working . the FPC * nix systems, is not incorporated into automatically the fibers of the support , but it is needed. This launch of the cthreads unit is made . Every application that the component uses , the main program uses part of should be the cthreads unit. This is from himself the Lazarus is no exception . This in two ways: | |
− | 1) | + | 1) Open up the package. The csomagszerkesztőben click the '' Options'' on . A'' Usage '' tab, add for '' custom '' line the '' ' dUseCThreads '' ' switch. Then rebuild the IDE . so the cthreads unit will be used automatically in the IDE under Unix and cthreads will be started. |
− | 2) | + | 2) The package amendment to avoid the FPC compiler command line switch direct use of is required. A click on '' Tools- > Configure "Build Lazarus "'' menu item . In the window that appears, the Lazarus building Options located where the "Options " box, type '' ' Facthreads ''' and click " OK " button. The next step is installing the package . The Lazarus the - Facthreads switch will be recreated in which means that the main program, it will be interpreted as if cthreads unit still he were first the uses part |
− | '' | + | '' Tip : ''The old ( with no loose ) Lazarus can be found lazarus.old named , in the same directory where the collapsing Lazarus executable is . |
− | + | See also: [[ Multithreaded_Application_Tutorial # Units_needed_for_a_multithreaded_application ] ]'' (in English ) '' | |
− | === | + | === When fibers ( threads) working a program running , an error message I get : " Runtime Error 232 ' === |
− | + | ||
− | + | The compiler error message is as follows: | |
− | + | This binary has no thread support compiled in. | |
− | + | Recompile the application with the threads driver in the program uses | |
− | + | clause Before Other unITS using thread . | |
− | + | Runtime error 232 | |
− | ''' | + | ''' Solution ''' : Add a cthreads Units first the uses part of the főprogramodban , which is usually one . lpr file . |
− | === Ubuntu Breezy/Mandriva KDE3 | + | === Ubuntu Breezy / Mandriva KDE3 using the letters the Lazarus IDE in is too big === |
− | + | Lazarus the Gtk1.2 from has been translated the Gnome font settings do not affect the program as they the gtk2 - re relate to . | |
− | + | Try this: | |
− | + | Create a file. gtkrc.mine name of the user (home) directory ( if not already there) and add | |
− | + | add these lines: | |
<pre> | <pre> | ||
− | style "default-text" { | + | style "default -text " { |
− | + | fonts = " -*- arial -medium -r -normal - *- 100 -*-*-*-*- ISO8859 -1, \ | |
− | + | -*- helvetica -medium -r -normal - *- 100 -*-*-*-*-*-*" | |
} | } | ||
− | class "GtkWidget" style "default-text" | + | class " GtkWidget "style "default -text " |
− | </pre> | + | < / pre > |
− | + | If this is not enough , try to create one. gtkrc symbolic link is a . gtkrc.mine file shows . This solution worked Xubuntu 7.10, Mandriva 2009.0 KDE3 systems. | |
− | === | + | === How to use a GTK programs different . rc files? === |
− | a) | + | a) Option : |
− | + | rename it the rc file to '' programod.gtkrc '' name and put into the same directory where the executable is . | |
− | b) | + | b ) Option |
− | + | Use the '' GtkInt '' United and the following function call : '' GTKWidgetSet.SetRCFilename (' kiválasztott_rc_fájl ');'' | |
− | + | This is best the '' Application.Initialize '' operation before done the . lpr file '' { $ ifdef LCLGtk } '' directive. | |
− | c) | + | c ) Option |
− | + | Use the '' gtk2 '' Units and '' gtk_rc_parse (' kiválasztott_rc_fájl '));'' and '' gtk_rc_reparse_all ; '' function calls . | |
− | ===Ubuntu | + | === Ubuntu I use and I can not gtk2 - re compile missing libraries because of === |
− | + | the Ubuntu for trouble that they are not always created the symbolic links even though they take the libraries are installed. | |
− | + | Before gtk2 - re compile , check that all the missing library exists in the proper symbolic link. You should do: | |
<pre> | <pre> | ||
− | cd /usr/lib | + | cd / usr / lib |
− | sudo ln -s libgdk-x11-2.0.so.0 libgtk-x11-2.0.so | + | sudo ln -s libgdk - x11- 2.0.so.0 libgtk - x11- 2.0.so |
− | </pre> | + | < / pre > |
− | + | Check that [ something ]. so a symbolic link there is and to the current library pointing . | |
− | === | + | === How can I build a program to gtk2 - re ? === |
− | + | The GTK2 spending IDE is not yet fully stable, but to compile software gtk2 from the Gtk1 - inch IDE using . | |
− | + | First the LCL recompile necessary to for . The menu, click on "Tools -> Configure Build Lazarus " , and then the LCL at select the "clean & build "in , and anything else " none " . Then click " OK " button. | |
− | + | The menu, click on " Tools- > Build Lazarus ' point . | |
− | + | Now you can compile your software gtk2 - re if you " Compiler options " between the ablakelemkészletet ( widgets ) , set to . | |
− | === | + | === This is the message I get: " [ WARNING ] ** multibyte character encodings ( like UTF8 ) are not supported at the moment ."=== |
− | + | This error does not occur in the 10 535 ( 0.9.21 ) number version after the expenditure. | |
− | + | Prior to that as a warning served UTF -8 encoded texts are used. | |
− | + | The internal key management procedures gtk1 for they could not handle the so coded keystrokes , which meant that example, accented characters for , or poorly perceived they are . | |
− | ( | + | (original text older Lazarus versions ) <br> |
<strike> | <strike> | ||
− | + | This warning means that UTF -8 character encoding using a . If Gtk 1 you use this is a serious problem may and prevent Lazarus or the to applications work properly. | |
− | + | The solution is to adjust the local character encoding is not utf -8 mode before from the command line you start the program , like this: | |
<pre> | <pre> | ||
− | export LC_CTYPE="pt_BR" | + | export LC_CTYPE = " pt_BR " |
− | export LANG="pt_BR" | + | export LANG = " pt_BR " |
− | export LANGUAGE="pt_BR" | + | export LANGUAGE = " pt_BR " |
− | ./lazarus | + | . / lazarus |
− | </pre> | + | < / pre > |
− | + | The pt_BR place , of course, Thy kingdom ID into . The automatic setup script to create . | |
− | </strike> | + | < / strike > |
== Windows == | == Windows == | ||
− | === | + | === When the ' cycle ' translation I use, this I get : "The Name Specified Is Not Recognized as an internal or external command , operable program or batch file . > & WAS unexpected at this time ' . === |
− | + | The compiler library of has a OS2 script make.cmd name. Different versions of Windows can script understand this , delete , because although this is necessary OS2 - n, but a problem Windows on . | |
− | === | + | === When the ' cycle ' translation I use, this I get : 'make [ 3]: ./ppc1.exe : Command not found ' === |
− | + | Do not know why, make you forget the route. Try the ' cycle ' translation of the base set to run like this: | |
− | + | Make cycle BASEDIR = your_fpc_source_dir_herecompiler | |
− | === | + | === When Lazarus was again I want to paid (make command), I get an error : === |
− | ====make.exe: * * * interfaces: No such file or directory (ENOENT). Stop.make.exe: * * * [interfaces_all] Error 2 ==== | + | ==== make.exe : * * * interfaces : No such file or directory ( ENOENT ). Stop.make.exe : * * * [ interfaces_all ] Error 2 ==== |
− | + | You need to upgrade to the make file. | |
− | ====makefile:27: *** You need the GNU utils package to use this Makefile. | + | ==== makefile : 27: *** You need the GNU utils package to use this Makefile . Stop .==== |
− | + | Make sure that the FPC is not a path you have installed, which the name space also is . The Makefile is not supported. | |
− | === | + | === How do I add my program XP look like Lazarus should have? === |
− | + | the menu Starting from " Project | Project Options | Use manifest to enables themes " is checked. | |
− | === | + | === When I a Lazarus- VERSION made running , the DOS window will start === |
− | Add | + | Add the -WG parameter (Windows GUI ), the compiler command line or tick the " Windows GUI " checkbox in the Lazarus IDE translation settings ( from the menu starting " Project | Project Options | Compiler Options | Linking | target OS Specific options | Win32 GUI application " ). |
== Mac OS X == | == Mac OS X == | ||
− | === | + | === Why does the translation " unknown section attribute: no_dead_strip ' message? === |
− | + | The 'dead' code removing does not support the assembler and the lacing ( linker ) to Xcode 1.5, (available on Mac OS X 10.3.9 version ). Turn off the following translation options: | |
− | *Code > Unit style > Smart linkable (-CX) | + | * Code > Unit style> Smart linkable (- CX) |
− | *Linking > Link Style > Link | + | * Linking > Link Style> Link Smart (- XX) |
− | == | + | == Permits ( Licenses ) == |
− | === | + | === Can I make commercial applications of Lazarus thread? === |
− | + | Yes, the LCL the LGPL permits can be used as an exception , which permits the static concatenation ( linking ) the application's source code the publication of without . The changes and improvements to the LCL code , however, its source code together with extended should be . The Lazarus IDE a GPL license is under . LCL only the source code included in are the ' LCL ' directory , other codes are not be here to placed and thereby disguise . | |
− | === | + | === Why do we certain components use limited to in commercial applications ? === |
− | + | The Lazarus contains third -party components . These different licenses may be used under . If you want to use them , you have to look at the licenses package source . Most third -party component of the " components " directory. | |
− | === | + | === How do I know whether a component the LCL is part of ? === |
− | + | Each LCL unit of the " LCL ' directory. LCL forming part of Units list can be found the http://lazarus-ccr.sourceforge.net/docs/lcl/ at . If code a are not listed Units using , probably a component using that is not part of the LCL 's . | |
− | === | + | === Can I trade add a Lazarus to ? === |
− | + | Yes, it is IDEIntf called part of the IDE has the LGPL licenses for the use of the above- mentioned exceptions , | |
− | + | so the that shared data structures does not require that the bővítményedet or of the design package you the GPL placed under . Optional any engedélyezésű Add ; do not want to limit the choice. In short : non- GPL compatible extensions is also permitted . | |
− | + | It should be noted , that not allowed a has compiled Lazarus distribution of statically built-in, non - GPL compliant extensions , however, think that this is not a serious limitation , because the Lazarus easy to recompile . | |
− | == | + | == the Forum Using == |
− | === | + | === How can I ask questions correct in the forum ? === |
− | + | First and foremost, I always need to know what Lazarus, FPC , Ablakelemkészlet ( widgets ), CPU and Operating System ( defined )) version using ! Do not just say that the " latest ", always a clear version give it . Daily code event (development version) the review number of ( revision number ) and / or date is important. | |
− | + | When we are interested , that something why do does not work always enclose a brief source code, which demonstrates the problem and often a picture will be useful. images upload to the http://imageshack.us/ and the like sites , then add your link . | |
− | + | Try general overview, and possibly more a more detailed description give of the problem. | |
− | + | How can you ask questions the smart way , here you can read about : http://catb.org/esr/faqs/smart-questions.html | |
− | == | + | == Contributors & Comments == |
− | + | This site is the English page translation , which epikwiki [ http://lazarus-ccr.sourceforge.net/index.php?wiki=LazarusFaq version] was drawn. | |
− | <!--[[Category:Lazarus/ | + | <!--[[ Category : Lazarus / en ]]--> |
Revision as of 06:56, 29 September 2010
{ { Lazarus Faq } }
Lazarus GY.I.K. < / font >
in progress ...
General
Why is it so big the up binaries ?
The binaries are large because they debug information contain , which gdb (GNU Debugger ) is necessary to use .
The compiler has a switch which can be removed from the debugging information in the executable file (- Xs ), but because of an error ( 2.0.2 and earlier versions ) it will not work properly . The error been corrected has the compiler 2.0.4 and in future versions of .
You can use ' strip 'is a program the debug symbols to remove in the executable file. lazarus directory (for example, lazarus \ fpc \ bin \ i386- win32 \).
Just type the command " strip - strip -all <a_futtatható_fájl_neve_útvonallal> ".
If an even smaller you want your program size of , you can try [ http://upx.sourceforge.net/ UPX ] program. The UPX is a very good compression specifically executable files to compress . It includes no memory overhead due to in-place decompression . Very quickly compress the files (~ 10 MB / sec in a Pentium 133 machine).
The UPX hazsnálatához enter the command : " upx <a_futtatható_fájl_neve_útvonallal> ".
After each command ( strip and upx ) is finished, a Lazarus - VERSION made a simple GUI application size approx . many will be :
- ~ 700KB on Linux
- ~ 420kb on Windows
A more detailed response to the UPX of using potential drawbacks also can be found here : [ [Size Matters ]]