https://wiki.freepascal.org/api.php?action=feedcontributions&user=Kurishin&feedformat=atomFree Pascal wiki - User contributions [en]2024-03-28T09:09:55ZUser contributionsMediaWiki 1.35.6https://wiki.freepascal.org/index.php?title=Lazarus_Documentation/ko&diff=49570Lazarus Documentation/ko2011-04-22T09:30:27Z<p>Kurishin: /* 라자루스 사용자 가이드 */</p>
<hr />
<div>{{Lazarus Documentation}}<br />
<br />
==라자루스와 파스칼 튜토리얼==<br />
*[[Overview of Free Pascal and Lazarus/ko|프리파스칼과 라자루스 살펴보기]] - 간략한 소개글 입니다.<br />
*[[Lazarus Tutorial/ko|라자루스 튜토리얼]] - 라자루스 IDE에 대해 자세히 다루고 있는 초보자를 위한 설명서 입니다.<br />
*[[Lazarus IDE Tools/ko|라자루스 IDE 툴]] - 코드 자동완성을 비롯한 기타 IDE의 내용들을 다루는 중급자용 설명서 입니다.<br />
*[[Lazarus Database Tutorial|라자루스 데이터베이스 튜토리얼]] - 데이터베이스 개발에 라자루스를 사용하기 위한 소개서 입니다.<br />
*[[Developing with Graphics/ko|그래픽 개발]] - 그래픽 프로그래밍을 위한 기본적인 예제들 입니다.<br />
*[[Pascal Tutorial]] - [http://www.taoyue.com/ Tao Yue's] [http://www.taoyue.com/tutorials/pascal/ Pascal Tutorial] (reposted with permission).<br />
*[[Object Oriented Programming with FreePascal and Lazarus|프리파스칼과 라자루스를 사용한 객체 지향 프로그래밍]] - 파스칼 이상의 파스칼<br />
*[[Console Mode Pascal|콘솔 모드 파스칼]] - 라자루스 IDE를 사용해 텍스트 모드에서 구동되는 프로그램 만들기 입니다.<br />
*[[Executing External Programs|외부 프로그램 실행]] - 외부 프로그램을 실행시키는 방법에 대한 간단한 설명서 입니다.<br />
*[[TXMLPropStorage]] - Using TXMLPropStorage to save user preferences.<br />
*[[Hardware Access/ko|하드웨어 제어]] - ISA, PCI카드, 패러랠, 시리얼, USB 디바이스 등의 하드웨어 접근법 입니다.<br />
*[[Networking/ko|네트워킹]] - Tutorials about TCP/IP protocol, creating secure network programs, WebServices, etc.<br />
*[[XML Tutorial/ko|XML 튜토리얼]] - XML 파일 읽고 쓰기에 대한 내용 입니다.<br />
*[[Multithreaded Application Tutorial|멀티쓰레드 어플리케이션 튜토리얼]] - 프리파스칼과 라자루스를 사용한 멀티쓰레드 어플리케이션 제작법 입니다.<br />
*[[Streaming components|스트리밍 컴포넌트]] - 스트림에 컴포넌트를 저장하고, 다시 읽어들여 생성하는 방법 입니다.<br />
*[[OpenGL Tutorial/ko|OpenGL 튜토리얼]] - GLUT 라이브러리를 라자루스에서 사용하는 방법 입니다.<br />
*[[Creating bindings for C libraries|C 라이브러리와 연결]] - C 헤더파일을 (.h) 파스칼 유니트로 변환하는 방법에 대해 설명합니다.<br />
*[[Lazarus/FPC Libraries]] - 동적 라이브러리 (.so, .dll, .dylib) 를 만들고 또 그것을 사용하는 방법에 대해 설명합니다.<br />
*[[Translations / i18n / localizations for programs]] - 프로그램과 패키지를 로컬라이즈 하는 방법을 다룹니다.<br />
*[[Daemons and Services]] - 윈도의 서비스, 또는 리눅스의 데몬을 만드는 법에 대해 이야기 합니다.<br />
*[[Office Automation]] - 오피스 소프트웨어를 제어해 스프레트쉬트, 텍스트문서, 프리젠테이션 등을 생성하는 방법에 대해 다룹니다. <br />
*[[Lazarus Inline Assembler|라자루스 인라인 어셈블러]] - 입문서 입니다.<br />
*[[VirtualTreeview Example for Lazarus]] - 라자루스의 VirtualTreeview 사용법 입니다. <br />
*[http://es.wikibooks.org/wiki/Programaci%C3%B3n_en_Pascal Programando en Pascal] - Spanish tutorial focused on FPC/Lazarus, hosted in Wikibooks.<br />
<br />
==라자루스 사용자 가이드==<br />
*[[Lazarus Faq/ko|라자루스 FAQ]] - 리눅스 및 윈도 유저를 위한 일반적인 정보들 입니다.<br />
*[[Lazarus DB Faq|라자루스 DB FAQ]] - 라자루스에서 DB를 다룰 때 만나는 문제들에 대한 FAQ 입니다.<br />
*[[Databases in Lazarus|라자루스와 데이터베이스]] - 라자루스에서 데이터베이스를 사용하는 것에 대한 간략한 안내 입니다.<br />
*[[Code Examples|예제 모음]] - 라자루스 예제 모음 입니다.<br />
*[[Feature_Ideas|Wishlist/Wanted Features]] - 라자루스에 추가되었으면 하는 기능들.<br />
*[[How do I create a bug report]] - 라자루스에 대한 오류를 발견했을 때 알리는 방법.<br />
<br />
===설치하기=== <br />
*[[Installing Lazarus/ko|라자루스 설치]] - 설치 방법에 대한 안내 입니다.<br />
*[[Getting Lazarus|라자루스 구하기]] - 라자루스의 릴리즈버전, 또는 SVN을 통한 개발버전을 얻는 방법에 대한 안내 입니다. <br />
*[[Multiple Lazarus|여러 버전의 라자루스]] - 한 대의 컴퓨터에 여러 버전의 라자루스를 설치하는 방법에 대한 안내 입니다.<br />
<br />
===IDE===<br />
*[[IDE tricks]] - 팁, 트릭 및 숨겨진 기능.<br />
*[[Lazarus IDE]] - 통합개발환경 창.<br />
*[[Lazarus IDE Shortcuts]] - 키 매핑과 단축키.<br />
*[[Lazarus Packages]] - 라자루스로 패키지 만들기.<br />
*[[Install Packages]] - 패키지 설치하기.<br />
*[[Extending the IDE]] - 라자루스 개발환경에 새로운 기능 추가하기.<br />
*[[Adding Kylix Help]] - 개발환경 편집기에서 리눅스용 델파이 도움말 사용하기.<br />
*[[Using Lazarus for other computer languages]] - 개발환경에서 C, Java 등의 언어 사용하기.<br />
*[[IDE Development]] - 개발환경 제작에 대한 여러가지 정보.<br />
<br />
===LCL===<br />
*[[doc:lcl/|LCL documentation]] - LCL 온라인 도움말 (작업중).<br />
*[[The LCL in various platforms]] - A brief discussion about LCL features which behave differently in different platforms.<br />
*[[Autosize / Layout]] - How to design forms that work on all platforms.<br />
*[[Main Loop Hooks]] - How to handle multiple event sources<br />
*[[Asynchronous Calls]] - How to queue methods for later execution<br />
*[[File size and smartlinking]] - How to smartlink applications and create smaller executables.<br />
*[[Accessing the Interfaces directly]] - Example how to access the LCL widgetsets<br />
*[[Add Help to Your Application]] - How to create a Online Help for your application<br />
*[[Anchor Sides]] - Description of Anchor Sides Feature<br />
*[[LCL Tips]] - Tips and tricks<br />
*[[LCL Defines]] - Choosing the right options to recompile LCL<br />
<br />
===개발하기===<br />
*[[The Power of Proper Planning and Practices]] - common-sense programming best practices for the Free Pascal and Lazarus developer<br />
*[[Multiplatform Programming Guide]] - How to develop cross-platform applications and how to port from one platform to another<br />
*[[Using Pascal Libraries with .NET and Mono]] - yes, you can use your Free Pascal code with .NET and Mono<br />
*[[Deploying Your Application]] - How to create an installer for your application<br />
*[[Cross compiling]] - Creating executables of one platform, on another.<br />
*[[Remote Debugging]] - How to debug your Lazarus application from another machine.<br />
*[[Application Icon]] - Setting the application icon<br />
<br />
===플랫폼 별 유용한 팁===<br />
*[[OS X Programming Tips/ko|OS X Programming Tips]] - Lazarus 설치, 유용한 툴, Unix 명령어, 그외...<br />
*[[WinCE Programming Tips/ko|WinCE Programming Tips]] - 텔레폰 API, SMS 전송, 그외... 사용하기<br />
<br />
===함께 하면 유용한 도구들===<br />
*[[Lazarus Documentation Editor]] - Using "lazde" to create documentation<br />
*[[LazDoc]] - An integrated editor for documentation files<br />
*[[FPDoc Updater]] - A GUI tool for updating FPDoc files<br />
*[[lazbuild]] - 통합개발환경 밖에서 프로젝트 및 패키지 컴파일하기<br />
*[[LazSVNPkg]] - 라자루스 SVN 개발환경 플러그인<br />
<br />
===델파이 사용자를 위한 안내===<br />
*[[Lazarus Components|라자루스 컴포넌트]] - 라자루스와 터보델파이 컴포넌트들의 차이점에 대한 정보 입니다. <br />
*[[Lazarus For Delphi Users|델파이 사용자와 라자루스]] - 라자루스를 시작하려는 델파이 사용자를 위한 정보들 입니다.<br />
*[[Code Conversion Guide|코드 변환 가이드]] - 델파이와 카일릭스용 코드 및 컴포넌트를 라자루스에서 사용하는 방법에 대해 다룹니다.<br />
<br />
==라자루스 개발자 가이드==<br />
*[[Lazarus Development Process|라자루스 개발 프로세스]] - 로드맵, 아이디어, 그리고 현재.<br />
*[[How To Help Developing Lazarus|라자루스 개발을 돕는 법]] - 라자루스의 성능 개선을 위해 도움을 주려는 새로운 개발자가 참고할만한 내용들<br />
*[[Version Numbering|버전 번호 붙이기]] - 라자루스의 버전 번호의 차이점에 대한 설명 <br />
*[[Creating A Patch| 패치 만들기]] - 개선된 기능을 라자루스에 적용하기 위해 패치를 만드는 방법<br />
*[[Creating a Backtrace with GDB|GBD용 백트레이스 생성]] - 디버깅을 위해 백트레이스를 만드는 방법<br />
*[[Nomenclature/ko|이름 붙이기]] - 메소드나 프로퍼티에 이름 붙이는 방법에 대한 설명<br />
*[[DesignGuidelines/ko|디자인 가이드 라인]] - 라자루스 소스 코드 변경시 준수해야 할 규칙<br />
*[[GUI design]] - Notes on guidelines when designing the lazarus GUI<br />
*[[Roadmap]] - An idea of the current status of the various parts of Lazarus<br />
*[[Road To 1.0]] - What needs to be done for Lazarus 1.0 and To Do lists<br />
*[[Moderating the bug tracker]] - Guidelines for lazarus developers and moderators for using the [http://www.freepascal.org/mantis/ bug tracker].<br />
*[[Codetools]] - How the codetools are integrated into the IDE<br />
*[[Creating IDE Help]] - How to extend the IDE documentation<br />
*[[Unit not found - How to find units]] - How to setup the IDE and source files<br />
*[[Bounties]] - Need a particular new feature soon? Set a price here. <br />
<br />
===LCL - 라자루스 컴포넌트 라이브러리===<br />
*[[LCL Messages]] - Guide related to LCL Messages<br />
*[[LCL Internals]] - Some info about the inner workings of the LCL<br />
*[[LCL Key Handling]] - Help! A key press, what now?<br />
*[[LCL Internals - Resizing, Moving]] - How the LCL communicates with the LCL interface to resize, move controls<br />
*[[LCL Unicode Support]] - Road to Unicode enabled Lazarus<br />
*[[LCL Documentation Roadmap]] - Which units have to be documented<br />
*[[LCL Bindings]] - Bindings to use LCL on other languages<br />
<br />
===인터페이스===<br />
*[[Lazarus known issues (things that will never be fixed)]] - 인터페이스와 호환성이 있는 주제들의 리스트 <br />
*[[Win32/64 Interface]] - Windows 95/98/Me/2K/XP/Vista를 위한 winapi 인터페이스, CE는 제외<br />
*[[GTK1 Interface]] - Unixes, Mac OS X, Windows를 위한 gtk1.2<br />
*[[GTK2 Interface]] - Unixes, Mac OS X, Windows를 위한 gtk2<br />
*[[Carbon Interface]] - Mac OS X를 위한 카본 인터페이스<br />
*[[Qt Interface]] - Unixes, Mac OS X 및 리눅스 기반 PDAs를 위한 Qt 4인터페이스<br />
*[[Windows CE Interface/ko|Windows CE 인터페이스]] - 포켓 PC와 스마트폰 용<br />
*[[fpGUI Interface]] - 오브젝트 파스칼로만 작성한 위젯 셋<br />
*[[Cocoa Interface]] - Mac OS X를 위한 코코아 인터페이스<br />
<br />
===Translations===<br />
* [[Getting translation strings right]] A few notes for programmers on how to create and use translateable strings in your application. Quickly discusses general things about creating strings, offers a few hints on implementation issues and points out some things to consider when using English as base language in particular.<br />
* '''Localization Notes:'''<br />
:* [[German localization notes|German]] - Notes and guidelines for translating the Lazarus IDE to German, including a small dictionary to look up often used translations.<br />
:* [[Portuguese-Brazilian Localization Notes|Portuguese-Brazilian]] - Small dictionary containing common translations of terms used in the Lazarus IDE for the Portuguese-Brazilian translation.<br />
:* [[Russian localization notes|Russian]] - Notes and guidelines for translating the Lazarus IDE to Russian.<br />
<!-- *[[TO-DO]] Remaining Tasks --><br />
* [[Help:Add language bar | Add language bar]] explains how you can add a list of translations to the top of a wiki page.<br />
<br />
==추가 컴포넌트 문서==<br />
* [[Pascal Script]] 와[[Pascal Script Examples]] - 파스칼 스크립트 컴포넌트를 라자루스에서 사용하는 방법<br />
* [[OpenGL]] - OpenGL을 라자루스에서 사용하는 방법<br />
* [[KOL-CE/ko|KOL-CE]] - KOL&MCK 라이브러리의 프리 파스칼/라자루스 포트. 라자루스에서 Win32/WinCE를 위한 매우 컴팩트한 응용프로그램 생성 방법<br />
<br />
==Free Pascal Compiler Documentation==<br />
In addition to [http://lazarus-ccr.sourceforge.net/fpcdoc/ this site], the latest version of the documentation can also be found online and in a variety of downloadable formats on the main [http://www.freepascal.org/docs.html Free Pascal Compiler site].<br />
There is now also a WiKi site for FreePascal [http://www.freepascal.org/wiki/index.php/Main_Page] very similar in style to this one, to allow developers to submit documentation in addition to the official FPC documents below.<br />
<br />
*[http://lazarus-ccr.sourceforge.net/fpcdoc/user/user.html User's guide]<br />
*[http://lazarus-ccr.sourceforge.net/fpcdoc/prog/prog.html Programmer's guide]<br />
*[http://lazarus-ccr.sourceforge.net/fpcdoc/ref/ref.html Reference guide for the system unit, and supported Pascal constructs]<br />
*[http://lazarus-ccr.sourceforge.net/fpcdoc/rtl/index.html Run-Time Library reference manual]<br />
*[http://lazarus-ccr.sourceforge.net/fpcdoc/fcl/index.html Free Component Library reference manual]<br />
*[http://lazarus-ccr.sourceforge.net/fpcdoc/fpdoc/fpdoc.html Free Pascal documentation tool manual]<br />
*[[Build messages]]<br />
<br />
==Lazarus related blogs and websites==<br />
'''Blogs'''<br />
*[[Adventures of a Newbie]] - A blog of a newbie getting started with some tutorial information in a running log.<br />
*[http://lazarusroad.blogspot.com/ On the road with Lazarus/Freepascal] - A blog dedicated to register my experiences while programming with Lazarus and Freepascal (by Luiz Américo)<br />
*[http://port2laz.blogspot.com/ Porting to Lazarus] - This blog describes the porting of a medium-sized application (~100 kloc) from D7 with CLX to Lazarus (by Alexsander da Rosa)<br />
*[http://living-lazarus.blogspot.com/ Living Lazarus] - One mans exploration into the possibilities of an open source RAD (by [[User:Wibblytim|Wibblytim]]).<br />
*[http://beeography.wordpress.com/tag/object-pascal/ Bee.ography] just (another) Bee’s buzz!<br />
*[http://donaldshimoda.blogspot.com/ Parallel Pascal Worlds] Donald Shimoda.<br />
<br />
'''Websites'''<br />
*[[swainbrain pascal wiki]] - unique free pascal tutorials and info [http://mercury.it.swin.edu.au/swinbrain/index.php/Pascal#Pascal_Development_Tools swainbrain]</div>Kurishinhttps://wiki.freepascal.org/index.php?title=Lazarus_Documentation/ko&diff=49569Lazarus Documentation/ko2011-04-22T09:25:13Z<p>Kurishin: /* IDE */</p>
<hr />
<div>{{Lazarus Documentation}}<br />
<br />
==라자루스와 파스칼 튜토리얼==<br />
*[[Overview of Free Pascal and Lazarus/ko|프리파스칼과 라자루스 살펴보기]] - 간략한 소개글 입니다.<br />
*[[Lazarus Tutorial/ko|라자루스 튜토리얼]] - 라자루스 IDE에 대해 자세히 다루고 있는 초보자를 위한 설명서 입니다.<br />
*[[Lazarus IDE Tools/ko|라자루스 IDE 툴]] - 코드 자동완성을 비롯한 기타 IDE의 내용들을 다루는 중급자용 설명서 입니다.<br />
*[[Lazarus Database Tutorial|라자루스 데이터베이스 튜토리얼]] - 데이터베이스 개발에 라자루스를 사용하기 위한 소개서 입니다.<br />
*[[Developing with Graphics/ko|그래픽 개발]] - 그래픽 프로그래밍을 위한 기본적인 예제들 입니다.<br />
*[[Pascal Tutorial]] - [http://www.taoyue.com/ Tao Yue's] [http://www.taoyue.com/tutorials/pascal/ Pascal Tutorial] (reposted with permission).<br />
*[[Object Oriented Programming with FreePascal and Lazarus|프리파스칼과 라자루스를 사용한 객체 지향 프로그래밍]] - 파스칼 이상의 파스칼<br />
*[[Console Mode Pascal|콘솔 모드 파스칼]] - 라자루스 IDE를 사용해 텍스트 모드에서 구동되는 프로그램 만들기 입니다.<br />
*[[Executing External Programs|외부 프로그램 실행]] - 외부 프로그램을 실행시키는 방법에 대한 간단한 설명서 입니다.<br />
*[[TXMLPropStorage]] - Using TXMLPropStorage to save user preferences.<br />
*[[Hardware Access/ko|하드웨어 제어]] - ISA, PCI카드, 패러랠, 시리얼, USB 디바이스 등의 하드웨어 접근법 입니다.<br />
*[[Networking/ko|네트워킹]] - Tutorials about TCP/IP protocol, creating secure network programs, WebServices, etc.<br />
*[[XML Tutorial/ko|XML 튜토리얼]] - XML 파일 읽고 쓰기에 대한 내용 입니다.<br />
*[[Multithreaded Application Tutorial|멀티쓰레드 어플리케이션 튜토리얼]] - 프리파스칼과 라자루스를 사용한 멀티쓰레드 어플리케이션 제작법 입니다.<br />
*[[Streaming components|스트리밍 컴포넌트]] - 스트림에 컴포넌트를 저장하고, 다시 읽어들여 생성하는 방법 입니다.<br />
*[[OpenGL Tutorial/ko|OpenGL 튜토리얼]] - GLUT 라이브러리를 라자루스에서 사용하는 방법 입니다.<br />
*[[Creating bindings for C libraries|C 라이브러리와 연결]] - C 헤더파일을 (.h) 파스칼 유니트로 변환하는 방법에 대해 설명합니다.<br />
*[[Lazarus/FPC Libraries]] - 동적 라이브러리 (.so, .dll, .dylib) 를 만들고 또 그것을 사용하는 방법에 대해 설명합니다.<br />
*[[Translations / i18n / localizations for programs]] - 프로그램과 패키지를 로컬라이즈 하는 방법을 다룹니다.<br />
*[[Daemons and Services]] - 윈도의 서비스, 또는 리눅스의 데몬을 만드는 법에 대해 이야기 합니다.<br />
*[[Office Automation]] - 오피스 소프트웨어를 제어해 스프레트쉬트, 텍스트문서, 프리젠테이션 등을 생성하는 방법에 대해 다룹니다. <br />
*[[Lazarus Inline Assembler|라자루스 인라인 어셈블러]] - 입문서 입니다.<br />
*[[VirtualTreeview Example for Lazarus]] - 라자루스의 VirtualTreeview 사용법 입니다. <br />
*[http://es.wikibooks.org/wiki/Programaci%C3%B3n_en_Pascal Programando en Pascal] - Spanish tutorial focused on FPC/Lazarus, hosted in Wikibooks.<br />
<br />
==라자루스 사용자 가이드==<br />
*[[Lazarus Faq/ko|라자루스 FAQ]] - 리눅스 및 윈도 유저를 위한 일반적인 정보들 입니다.<br />
*[[Lazarus DB Faq|라자루스 DB FAQ]] - 라자루스에서 DB를 다룰 때 만나는 문제들에 대한 FAQ 입니다.<br />
*[[Databases in Lazarus|라자루스와 데이터베이스]] - 라자루스에서 데이터베이스를 사용하는 것에 대한 간략한 안내 입니다.<br />
*[[Code Examples|예제 모음]] - 라자루스 예제 모음 입니다.<br />
*[[Feature_Ideas|Wishlist/Wanted Features]] - Features that you would like to see in Lazarus<br />
*[[How do I create a bug report]] - You think you found a bug in Lazarus, how can you report it?<br />
<br />
===설치하기=== <br />
*[[Installing Lazarus/ko|라자루스 설치]] - 설치 방법에 대한 안내 입니다.<br />
*[[Getting Lazarus|라자루스 구하기]] - 라자루스의 릴리즈버전, 또는 SVN을 통한 개발버전을 얻는 방법에 대한 안내 입니다. <br />
*[[Multiple Lazarus|여러 버전의 라자루스]] - 한 대의 컴퓨터에 여러 버전의 라자루스를 설치하는 방법에 대한 안내 입니다.<br />
<br />
===IDE===<br />
*[[IDE tricks]] - 팁, 트릭 및 숨겨진 기능.<br />
*[[Lazarus IDE]] - 통합개발환경 창.<br />
*[[Lazarus IDE Shortcuts]] - 키 매핑과 단축키.<br />
*[[Lazarus Packages]] - 라자루스로 패키지 만들기.<br />
*[[Install Packages]] - 패키지 설치하기.<br />
*[[Extending the IDE]] - 라자루스 개발환경에 새로운 기능 추가하기.<br />
*[[Adding Kylix Help]] - 개발환경 편집기에서 리눅스용 델파이 도움말 사용하기.<br />
*[[Using Lazarus for other computer languages]] - 개발환경에서 C, Java 등의 언어 사용하기.<br />
*[[IDE Development]] - 개발환경 제작에 대한 여러가지 정보.<br />
<br />
===LCL===<br />
*[[doc:lcl/|LCL documentation]] - On line help for LCL (work in progress).<br />
*[[The LCL in various platforms]] - A brief discussion about LCL features which behave differently in different platforms.<br />
*[[Autosize / Layout]] - How to design forms that work on all platforms.<br />
*[[Main Loop Hooks]] - How to handle multiple event sources<br />
*[[Asynchronous Calls]] - How to queue methods for later execution<br />
*[[File size and smartlinking]] - How to smartlink applications and create smaller executables.<br />
*[[Accessing the Interfaces directly]] - Example how to access the LCL widgetsets<br />
*[[Add Help to Your Application]] - How to create a Online Help for your application<br />
*[[Anchor Sides]] - Description of Anchor Sides Feature<br />
*[[LCL Tips]] - Tips and tricks<br />
*[[LCL Defines]] - Choosing the right options to recompile LCL<br />
<br />
===Developing===<br />
*[[The Power of Proper Planning and Practices]] - common-sense programming best practices for the Free Pascal and Lazarus developer<br />
*[[Multiplatform Programming Guide]] - How to develop cross-platform applications and how to port from one platform to another<br />
*[[Using Pascal Libraries with .NET and Mono]] - yes, you can use your Free Pascal code with .NET and Mono<br />
*[[Deploying Your Application]] - How to create an installer for your application<br />
*[[Cross compiling]] - Creating executables of one platform, on another.<br />
*[[Remote Debugging]] - How to debug your Lazarus application from another machine.<br />
*[[Application Icon]] - Setting the application icon<br />
<br />
===플랫폼 별 유용한 팁===<br />
*[[OS X Programming Tips/ko|OS X Programming Tips]] - Lazarus 설치, 유용한 툴, Unix 명령어, 그외...<br />
*[[WinCE Programming Tips/ko|WinCE Programming Tips]] - 텔레폰 API, SMS 전송, 그외... 사용하기<br />
<br />
===함께 하면 유용한 도구들===<br />
*[[Lazarus Documentation Editor]] - Using "lazde" to create documentation<br />
*[[LazDoc]] - An integrated editor for documentation files<br />
*[[FPDoc Updater]] - A GUI tool for updating FPDoc files<br />
*[[lazbuild]] - Compiling projects and packages without the IDE<br />
*[[LazSVNPkg]] - Lazarus SVN IDE Plugin<br />
<br />
===델파이 사용자를 위한 안내===<br />
*[[Lazarus Components|라자루스 컴포넌트]] - 라자루스와 터보델파이 컴포넌트들의 차이점에 대한 정보 입니다. <br />
*[[Lazarus For Delphi Users|델파이 사용자와 라자루스]] - 라자루스를 시작하려는 델파이 사용자를 위한 정보들 입니다.<br />
*[[Code Conversion Guide|코드 변환 가이드]] - 델파이와 카일릭스용 코드 및 컴포넌트를 라자루스에서 사용하는 방법에 대해 다룹니다.<br />
<br />
==라자루스 개발자 가이드==<br />
*[[Lazarus Development Process|라자루스 개발 프로세스]] - 로드맵, 아이디어, 그리고 현재.<br />
*[[How To Help Developing Lazarus|라자루스 개발을 돕는 법]] - 라자루스의 성능 개선을 위해 도움을 주려는 새로운 개발자가 참고할만한 내용들<br />
*[[Version Numbering|버전 번호 붙이기]] - 라자루스의 버전 번호의 차이점에 대한 설명 <br />
*[[Creating A Patch| 패치 만들기]] - 개선된 기능을 라자루스에 적용하기 위해 패치를 만드는 방법<br />
*[[Creating a Backtrace with GDB|GBD용 백트레이스 생성]] - 디버깅을 위해 백트레이스를 만드는 방법<br />
*[[Nomenclature/ko|이름 붙이기]] - 메소드나 프로퍼티에 이름 붙이는 방법에 대한 설명<br />
*[[DesignGuidelines/ko|디자인 가이드 라인]] - 라자루스 소스 코드 변경시 준수해야 할 규칙<br />
*[[GUI design]] - Notes on guidelines when designing the lazarus GUI<br />
*[[Roadmap]] - An idea of the current status of the various parts of Lazarus<br />
*[[Road To 1.0]] - What needs to be done for Lazarus 1.0 and To Do lists<br />
*[[Moderating the bug tracker]] - Guidelines for lazarus developers and moderators for using the [http://www.freepascal.org/mantis/ bug tracker].<br />
*[[Codetools]] - How the codetools are integrated into the IDE<br />
*[[Creating IDE Help]] - How to extend the IDE documentation<br />
*[[Unit not found - How to find units]] - How to setup the IDE and source files<br />
*[[Bounties]] - Need a particular new feature soon? Set a price here. <br />
<br />
===LCL - 라자루스 컴포넌트 라이브러리===<br />
*[[LCL Messages]] - Guide related to LCL Messages<br />
*[[LCL Internals]] - Some info about the inner workings of the LCL<br />
*[[LCL Key Handling]] - Help! A key press, what now?<br />
*[[LCL Internals - Resizing, Moving]] - How the LCL communicates with the LCL interface to resize, move controls<br />
*[[LCL Unicode Support]] - Road to Unicode enabled Lazarus<br />
*[[LCL Documentation Roadmap]] - Which units have to be documented<br />
*[[LCL Bindings]] - Bindings to use LCL on other languages<br />
<br />
===인터페이스===<br />
*[[Lazarus known issues (things that will never be fixed)]] - 인터페이스와 호환성이 있는 주제들의 리스트 <br />
*[[Win32/64 Interface]] - Windows 95/98/Me/2K/XP/Vista를 위한 winapi 인터페이스, CE는 제외<br />
*[[GTK1 Interface]] - Unixes, Mac OS X, Windows를 위한 gtk1.2<br />
*[[GTK2 Interface]] - Unixes, Mac OS X, Windows를 위한 gtk2<br />
*[[Carbon Interface]] - Mac OS X를 위한 카본 인터페이스<br />
*[[Qt Interface]] - Unixes, Mac OS X 및 리눅스 기반 PDAs를 위한 Qt 4인터페이스<br />
*[[Windows CE Interface/ko|Windows CE 인터페이스]] - 포켓 PC와 스마트폰 용<br />
*[[fpGUI Interface]] - 오브젝트 파스칼로만 작성한 위젯 셋<br />
*[[Cocoa Interface]] - Mac OS X를 위한 코코아 인터페이스<br />
<br />
===Translations===<br />
* [[Getting translation strings right]] A few notes for programmers on how to create and use translateable strings in your application. Quickly discusses general things about creating strings, offers a few hints on implementation issues and points out some things to consider when using English as base language in particular.<br />
* '''Localization Notes:'''<br />
:* [[German localization notes|German]] - Notes and guidelines for translating the Lazarus IDE to German, including a small dictionary to look up often used translations.<br />
:* [[Portuguese-Brazilian Localization Notes|Portuguese-Brazilian]] - Small dictionary containing common translations of terms used in the Lazarus IDE for the Portuguese-Brazilian translation.<br />
:* [[Russian localization notes|Russian]] - Notes and guidelines for translating the Lazarus IDE to Russian.<br />
<!-- *[[TO-DO]] Remaining Tasks --><br />
* [[Help:Add language bar | Add language bar]] explains how you can add a list of translations to the top of a wiki page.<br />
<br />
==추가 컴포넌트 문서==<br />
* [[Pascal Script]] 와[[Pascal Script Examples]] - 파스칼 스크립트 컴포넌트를 라자루스에서 사용하는 방법<br />
* [[OpenGL]] - OpenGL을 라자루스에서 사용하는 방법<br />
* [[KOL-CE/ko|KOL-CE]] - KOL&MCK 라이브러리의 프리 파스칼/라자루스 포트. 라자루스에서 Win32/WinCE를 위한 매우 컴팩트한 응용프로그램 생성 방법<br />
<br />
==Free Pascal Compiler Documentation==<br />
In addition to [http://lazarus-ccr.sourceforge.net/fpcdoc/ this site], the latest version of the documentation can also be found online and in a variety of downloadable formats on the main [http://www.freepascal.org/docs.html Free Pascal Compiler site].<br />
There is now also a WiKi site for FreePascal [http://www.freepascal.org/wiki/index.php/Main_Page] very similar in style to this one, to allow developers to submit documentation in addition to the official FPC documents below.<br />
<br />
*[http://lazarus-ccr.sourceforge.net/fpcdoc/user/user.html User's guide]<br />
*[http://lazarus-ccr.sourceforge.net/fpcdoc/prog/prog.html Programmer's guide]<br />
*[http://lazarus-ccr.sourceforge.net/fpcdoc/ref/ref.html Reference guide for the system unit, and supported Pascal constructs]<br />
*[http://lazarus-ccr.sourceforge.net/fpcdoc/rtl/index.html Run-Time Library reference manual]<br />
*[http://lazarus-ccr.sourceforge.net/fpcdoc/fcl/index.html Free Component Library reference manual]<br />
*[http://lazarus-ccr.sourceforge.net/fpcdoc/fpdoc/fpdoc.html Free Pascal documentation tool manual]<br />
*[[Build messages]]<br />
<br />
==Lazarus related blogs and websites==<br />
'''Blogs'''<br />
*[[Adventures of a Newbie]] - A blog of a newbie getting started with some tutorial information in a running log.<br />
*[http://lazarusroad.blogspot.com/ On the road with Lazarus/Freepascal] - A blog dedicated to register my experiences while programming with Lazarus and Freepascal (by Luiz Américo)<br />
*[http://port2laz.blogspot.com/ Porting to Lazarus] - This blog describes the porting of a medium-sized application (~100 kloc) from D7 with CLX to Lazarus (by Alexsander da Rosa)<br />
*[http://living-lazarus.blogspot.com/ Living Lazarus] - One mans exploration into the possibilities of an open source RAD (by [[User:Wibblytim|Wibblytim]]).<br />
*[http://beeography.wordpress.com/tag/object-pascal/ Bee.ography] just (another) Bee’s buzz!<br />
*[http://donaldshimoda.blogspot.com/ Parallel Pascal Worlds] Donald Shimoda.<br />
<br />
'''Websites'''<br />
*[[swainbrain pascal wiki]] - unique free pascal tutorials and info [http://mercury.it.swin.edu.au/swinbrain/index.php/Pascal#Pascal_Development_Tools swainbrain]</div>Kurishinhttps://wiki.freepascal.org/index.php?title=Lazarus_Documentation/ko&diff=49545Lazarus Documentation/ko2011-04-21T09:31:01Z<p>Kurishin: /* 라자루스 사용자 가이드 */</p>
<hr />
<div>{{Lazarus Documentation}}<br />
<br />
==라자루스와 파스칼 튜토리얼==<br />
*[[Overview of Free Pascal and Lazarus/ko|프리파스칼과 라자루스 살펴보기]] - 간략한 소개글 입니다.<br />
*[[Lazarus Tutorial/ko|라자루스 튜토리얼]] - 라자루스 IDE에 대해 자세히 다루고 있는 초보자를 위한 설명서 입니다.<br />
*[[Lazarus IDE Tools/ko|라자루스 IDE 툴]] - 코드 자동완성을 비롯한 기타 IDE의 내용들을 다루는 중급자용 설명서 입니다.<br />
*[[Lazarus Database Tutorial|라자루스 데이터베이스 튜토리얼]] - 데이터베이스 개발에 라자루스를 사용하기 위한 소개서 입니다.<br />
*[[Developing with Graphics/ko|그래픽 개발]] - 그래픽 프로그래밍을 위한 기본적인 예제들 입니다.<br />
*[[Pascal Tutorial]] - [http://www.taoyue.com/ Tao Yue's] [http://www.taoyue.com/tutorials/pascal/ Pascal Tutorial] (reposted with permission).<br />
*[[Object Oriented Programming with FreePascal and Lazarus|프리파스칼과 라자루스를 사용한 객체 지향 프로그래밍]] - 파스칼 이상의 파스칼<br />
*[[Console Mode Pascal|콘솔 모드 파스칼]] - 라자루스 IDE를 사용해 텍스트 모드에서 구동되는 프로그램 만들기 입니다.<br />
*[[Executing External Programs|외부 프로그램 실행]] - 외부 프로그램을 실행시키는 방법에 대한 간단한 설명서 입니다.<br />
*[[TXMLPropStorage]] - Using TXMLPropStorage to save user preferences.<br />
*[[Hardware Access/ko|하드웨어 제어]] - ISA, PCI카드, 패러랠, 시리얼, USB 디바이스 등의 하드웨어 접근법 입니다.<br />
*[[Networking/ko|네트워킹]] - Tutorials about TCP/IP protocol, creating secure network programs, WebServices, etc.<br />
*[[XML Tutorial/ko|XML 튜토리얼]] - XML 파일 읽고 쓰기에 대한 내용 입니다.<br />
*[[Multithreaded Application Tutorial|멀티쓰레드 어플리케이션 튜토리얼]] - 프리파스칼과 라자루스를 사용한 멀티쓰레드 어플리케이션 제작법 입니다.<br />
*[[Streaming components|스트리밍 컴포넌트]] - 스트림에 컴포넌트를 저장하고, 다시 읽어들여 생성하는 방법 입니다.<br />
*[[OpenGL Tutorial/ko|OpenGL 튜토리얼]] - GLUT 라이브러리를 라자루스에서 사용하는 방법 입니다.<br />
*[[Creating bindings for C libraries|C 라이브러리와 연결]] - C 헤더파일을 (.h) 파스칼 유니트로 변환하는 방법에 대해 설명합니다.<br />
*[[Lazarus/FPC Libraries]] - 동적 라이브러리 (.so, .dll, .dylib) 를 만들고 또 그것을 사용하는 방법에 대해 설명합니다.<br />
*[[Translations / i18n / localizations for programs]] - 프로그램과 패키지를 로컬라이즈 하는 방법을 다룹니다.<br />
*[[Daemons and Services]] - 윈도의 서비스, 또는 리눅스의 데몬을 만드는 법에 대해 이야기 합니다.<br />
*[[Office Automation]] - 오피스 소프트웨어를 제어해 스프레트쉬트, 텍스트문서, 프리젠테이션 등을 생성하는 방법에 대해 다룹니다. <br />
*[[Lazarus Inline Assembler|라자루스 인라인 어셈블러]] - 입문서 입니다.<br />
*[[VirtualTreeview Example for Lazarus]] - 라자루스의 VirtualTreeview 사용법 입니다. <br />
*[http://es.wikibooks.org/wiki/Programaci%C3%B3n_en_Pascal Programando en Pascal] - Spanish tutorial focused on FPC/Lazarus, hosted in Wikibooks.<br />
<br />
==라자루스 사용자 가이드==<br />
*[[Lazarus Faq/ko|라자루스 FAQ]] - 리눅스 및 윈도 유저를 위한 일반적인 정보들 입니다.<br />
*[[Lazarus DB Faq|라자루스 DB FAQ]] - 라자루스에서 DB를 다룰 때 만나는 문제들에 대한 FAQ 입니다.<br />
*[[Databases in Lazarus|라자루스와 데이터베이스]] - 라자루스에서 데이터베이스를 사용하는 것에 대한 간략한 안내 입니다.<br />
*[[Code Examples|예제 모음]] - 라자루스 예제 모음 입니다.<br />
*[[Feature_Ideas|Wishlist/Wanted Features]] - Features that you would like to see in Lazarus<br />
*[[How do I create a bug report]] - You think you found a bug in Lazarus, how can you report it?<br />
<br />
===설치하기=== <br />
*[[Installing Lazarus/ko|라자루스 설치]] - 설치 방법에 대한 안내 입니다.<br />
*[[Getting Lazarus|라자루스 구하기]] - 라자루스의 릴리즈버전, 또는 SVN을 통한 개발버전을 얻는 방법에 대한 안내 입니다. <br />
*[[Multiple Lazarus|여러 버전의 라자루스]] - 한 대의 컴퓨터에 여러 버전의 라자루스를 설치하는 방법에 대한 안내 입니다.<br />
<br />
===IDE===<br />
*[[IDE tricks]] - 팁, 트릭 및 숨겨진 기능들<br />
*[[Lazarus IDE]] - 통합개발환경 창<br />
*[[Lazarus IDE Shortcuts]] - 키 매핑과 단축키<br />
*[[Lazarus Packages]] - 라자루스로 패키지 만들기<br />
*[[Install Packages]] - 패키지 설치하기<br />
*[[Extending the IDE]] - How to add functionality to the Lazarus IDE<br />
*[[Adding Kylix Help]] - How to use the Borland Help files within the IDE editor.<br />
*[[Using Lazarus for other computer languages]] - How to use the IDE for C, Java, etc.<br />
*[[IDE Development]] - Various pages about current development of the IDE.<br />
<br />
===LCL===<br />
*[[doc:lcl/|LCL documentation]] - On line help for LCL (work in progress).<br />
*[[The LCL in various platforms]] - A brief discussion about LCL features which behave differently in different platforms.<br />
*[[Autosize / Layout]] - How to design forms that work on all platforms.<br />
*[[Main Loop Hooks]] - How to handle multiple event sources<br />
*[[Asynchronous Calls]] - How to queue methods for later execution<br />
*[[File size and smartlinking]] - How to smartlink applications and create smaller executables.<br />
*[[Accessing the Interfaces directly]] - Example how to access the LCL widgetsets<br />
*[[Add Help to Your Application]] - How to create a Online Help for your application<br />
*[[Anchor Sides]] - Description of Anchor Sides Feature<br />
*[[LCL Tips]] - Tips and tricks<br />
*[[LCL Defines]] - Choosing the right options to recompile LCL<br />
<br />
===Developing===<br />
*[[The Power of Proper Planning and Practices]] - common-sense programming best practices for the Free Pascal and Lazarus developer<br />
*[[Multiplatform Programming Guide]] - How to develop cross-platform applications and how to port from one platform to another<br />
*[[Using Pascal Libraries with .NET and Mono]] - yes, you can use your Free Pascal code with .NET and Mono<br />
*[[Deploying Your Application]] - How to create an installer for your application<br />
*[[Cross compiling]] - Creating executables of one platform, on another.<br />
*[[Remote Debugging]] - How to debug your Lazarus application from another machine.<br />
*[[Application Icon]] - Setting the application icon<br />
<br />
===플랫폼 별 유용한 팁===<br />
*[[OS X Programming Tips/ko|OS X Programming Tips]] - Lazarus 설치, 유용한 툴, Unix 명령어, 그외...<br />
*[[WinCE Programming Tips/ko|WinCE Programming Tips]] - 텔레폰 API, SMS 전송, 그외... 사용하기<br />
<br />
===함께 하면 유용한 도구들===<br />
*[[Lazarus Documentation Editor]] - Using "lazde" to create documentation<br />
*[[LazDoc]] - An integrated editor for documentation files<br />
*[[FPDoc Updater]] - A GUI tool for updating FPDoc files<br />
*[[lazbuild]] - Compiling projects and packages without the IDE<br />
*[[LazSVNPkg]] - Lazarus SVN IDE Plugin<br />
<br />
===델파이 사용자를 위한 안내===<br />
*[[Lazarus Components|라자루스 컴포넌트]] - 라자루스와 터보델파이 컴포넌트들의 차이점에 대한 정보 입니다. <br />
*[[Lazarus For Delphi Users|델파이 사용자와 라자루스]] - 라자루스를 시작하려는 델파이 사용자를 위한 정보들 입니다.<br />
*[[Code Conversion Guide|코드 변환 가이드]] - 델파이와 카일릭스용 코드 및 컴포넌트를 라자루스에서 사용하는 방법에 대해 다룹니다.<br />
<br />
==라자루스 개발자 가이드==<br />
*[[Lazarus Development Process|라자루스 개발 프로세스]] - 로드맵, 아이디어, 그리고 현재.<br />
*[[How To Help Developing Lazarus|라자루스 개발을 돕는 법]] - 라자루스의 성능 개선을 위해 도움을 주려는 새로운 개발자가 참고할만한 내용들<br />
*[[Version Numbering|버전 번호 붙이기]] - 라자루스의 버전 번호의 차이점에 대한 설명 <br />
*[[Creating A Patch| 패치 만들기]] - 개선된 기능을 라자루스에 적용하기 위해 패치를 만드는 방법<br />
*[[Creating a Backtrace with GDB|GBD용 백트레이스 생성]] - 디버깅을 위해 백트레이스를 만드는 방법<br />
*[[Nomenclature/ko|이름 붙이기]] - 메소드나 프로퍼티에 이름 붙이는 방법에 대한 설명<br />
*[[DesignGuidelines/ko|디자인 가이드 라인]] - 라자루스 소스 코드 변경시 준수해야 할 규칙<br />
*[[GUI design]] - Notes on guidelines when designing the lazarus GUI<br />
*[[Roadmap]] - An idea of the current status of the various parts of Lazarus<br />
*[[Road To 1.0]] - What needs to be done for Lazarus 1.0 and To Do lists<br />
*[[Moderating the bug tracker]] - Guidelines for lazarus developers and moderators for using the [http://www.freepascal.org/mantis/ bug tracker].<br />
*[[Codetools]] - How the codetools are integrated into the IDE<br />
*[[Creating IDE Help]] - How to extend the IDE documentation<br />
*[[Unit not found - How to find units]] - How to setup the IDE and source files<br />
*[[Bounties]] - Need a particular new feature soon? Set a price here. <br />
<br />
===LCL - 라자루스 컴포넌트 라이브러리===<br />
*[[LCL Messages]] - Guide related to LCL Messages<br />
*[[LCL Internals]] - Some info about the inner workings of the LCL<br />
*[[LCL Key Handling]] - Help! A key press, what now?<br />
*[[LCL Internals - Resizing, Moving]] - How the LCL communicates with the LCL interface to resize, move controls<br />
*[[LCL Unicode Support]] - Road to Unicode enabled Lazarus<br />
*[[LCL Documentation Roadmap]] - Which units have to be documented<br />
*[[LCL Bindings]] - Bindings to use LCL on other languages<br />
<br />
===인터페이스===<br />
*[[Lazarus known issues (things that will never be fixed)]] - 인터페이스와 호환성이 있는 주제들의 리스트 <br />
*[[Win32/64 Interface]] - Windows 95/98/Me/2K/XP/Vista를 위한 winapi 인터페이스, CE는 제외<br />
*[[GTK1 Interface]] - Unixes, Mac OS X, Windows를 위한 gtk1.2<br />
*[[GTK2 Interface]] - Unixes, Mac OS X, Windows를 위한 gtk2<br />
*[[Carbon Interface]] - Mac OS X를 위한 카본 인터페이스<br />
*[[Qt Interface]] - Unixes, Mac OS X 및 리눅스 기반 PDAs를 위한 Qt 4인터페이스<br />
*[[Windows CE Interface/ko|Windows CE 인터페이스]] - 포켓 PC와 스마트폰 용<br />
*[[fpGUI Interface]] - 오브젝트 파스칼로만 작성한 위젯 셋<br />
*[[Cocoa Interface]] - Mac OS X를 위한 코코아 인터페이스<br />
<br />
===Translations===<br />
* [[Getting translation strings right]] A few notes for programmers on how to create and use translateable strings in your application. Quickly discusses general things about creating strings, offers a few hints on implementation issues and points out some things to consider when using English as base language in particular.<br />
* '''Localization Notes:'''<br />
:* [[German localization notes|German]] - Notes and guidelines for translating the Lazarus IDE to German, including a small dictionary to look up often used translations.<br />
:* [[Portuguese-Brazilian Localization Notes|Portuguese-Brazilian]] - Small dictionary containing common translations of terms used in the Lazarus IDE for the Portuguese-Brazilian translation.<br />
:* [[Russian localization notes|Russian]] - Notes and guidelines for translating the Lazarus IDE to Russian.<br />
<!-- *[[TO-DO]] Remaining Tasks --><br />
* [[Help:Add language bar | Add language bar]] explains how you can add a list of translations to the top of a wiki page.<br />
<br />
==추가 컴포넌트 문서==<br />
* [[Pascal Script]] 와[[Pascal Script Examples]] - 파스칼 스크립트 컴포넌트를 라자루스에서 사용하는 방법<br />
* [[OpenGL]] - OpenGL을 라자루스에서 사용하는 방법<br />
* [[KOL-CE/ko|KOL-CE]] - KOL&MCK 라이브러리의 프리 파스칼/라자루스 포트. 라자루스에서 Win32/WinCE를 위한 매우 컴팩트한 응용프로그램 생성 방법<br />
<br />
==Free Pascal Compiler Documentation==<br />
In addition to [http://lazarus-ccr.sourceforge.net/fpcdoc/ this site], the latest version of the documentation can also be found online and in a variety of downloadable formats on the main [http://www.freepascal.org/docs.html Free Pascal Compiler site].<br />
There is now also a WiKi site for FreePascal [http://www.freepascal.org/wiki/index.php/Main_Page] very similar in style to this one, to allow developers to submit documentation in addition to the official FPC documents below.<br />
<br />
*[http://lazarus-ccr.sourceforge.net/fpcdoc/user/user.html User's guide]<br />
*[http://lazarus-ccr.sourceforge.net/fpcdoc/prog/prog.html Programmer's guide]<br />
*[http://lazarus-ccr.sourceforge.net/fpcdoc/ref/ref.html Reference guide for the system unit, and supported Pascal constructs]<br />
*[http://lazarus-ccr.sourceforge.net/fpcdoc/rtl/index.html Run-Time Library reference manual]<br />
*[http://lazarus-ccr.sourceforge.net/fpcdoc/fcl/index.html Free Component Library reference manual]<br />
*[http://lazarus-ccr.sourceforge.net/fpcdoc/fpdoc/fpdoc.html Free Pascal documentation tool manual]<br />
*[[Build messages]]<br />
<br />
==Lazarus related blogs and websites==<br />
'''Blogs'''<br />
*[[Adventures of a Newbie]] - A blog of a newbie getting started with some tutorial information in a running log.<br />
*[http://lazarusroad.blogspot.com/ On the road with Lazarus/Freepascal] - A blog dedicated to register my experiences while programming with Lazarus and Freepascal (by Luiz Américo)<br />
*[http://port2laz.blogspot.com/ Porting to Lazarus] - This blog describes the porting of a medium-sized application (~100 kloc) from D7 with CLX to Lazarus (by Alexsander da Rosa)<br />
*[http://living-lazarus.blogspot.com/ Living Lazarus] - One mans exploration into the possibilities of an open source RAD (by [[User:Wibblytim|Wibblytim]]).<br />
*[http://beeography.wordpress.com/tag/object-pascal/ Bee.ography] just (another) Bee’s buzz!<br />
*[http://donaldshimoda.blogspot.com/ Parallel Pascal Worlds] Donald Shimoda.<br />
<br />
'''Websites'''<br />
*[[swainbrain pascal wiki]] - unique free pascal tutorials and info [http://mercury.it.swin.edu.au/swinbrain/index.php/Pascal#Pascal_Development_Tools swainbrain]</div>Kurishinhttps://wiki.freepascal.org/index.php?title=Lazarus_Faq/ko&diff=44644Lazarus Faq/ko2010-09-06T00:15:55Z<p>Kurishin: /* 더 많은 FAQ를 볼 수 있는 곳은 어디인가요? */</p>
<hr />
<div>{{Lazarus Faq}}<br />
<br />
이 문서는 원래 www.lazarus.freepascal.org 에 있던 것 입니다. 관리 및 확장 면에서 위키가 훨씬 더 유용하기 때문에 이 곳으로 복사되었습니다. <br />
<br />
== 일반적인 이야기 ==<br />
<br />
=== 더 많은 FAQ 를 볼 수 있는 곳은 어디인가요? ===<br />
[http://www.lazarus.freepascal.org 공식 웹사이트]를 보세요. 그밖의 괜찮은 FAQ 가 있습니다.<br />
<br />
===도대체 실행파일의 크기가 왜 이렇게 큰 겁니까?===<br />
실행파일의 크기가 큰 이유는 GDB (GNU Debugger) 를 사용하기 위한 많은 정보들을 포함하고 있기 때문입니다. <br />
<br />
컴파일러에 이 디버깅 정보를 제거하기 위한 옵션 (-Xs) 이 있습니다만, 버전 2.0.2 이전의 컴파일러는 이 기능에 버그가 있기 때문에 제대로 동작하지 않습니다. 이 버그는 현재 개발버전에서는 수정되었습니다. <br />
<br />
"strip" 이라는 이름의 프로그램을 사용하면 실행파일로 부터 디버그 심볼을 삭제할 수 있습니다. 이 프로그램은 lazarus\pp\bin\i386-win32\ 에 있습니다. <br />
<br />
커맨드 라인에서 간단하게 "strip --strip-all <대상 실행파일의 경로와 이름>" 을 입력 하세요.<br />
<br />
실행파일을 좀 더 작게 만들려면, [http://upx.sourceforge.net/ UPX] 가 좋은 해법이 될 것입니다. UPX는 정말 멋진 실행파일 압축기 로서, 압축 해제에 추가적인 메모리가 필요없는 알고리즘을 사용합니다. (역자 주: 이 압축 알고리즘은 [http://www.oberhumer.com/opensource/lzo/ LZO] 라고 불리며, 오래 전 셀빅의 카마수트라 라는 어플에서 사용되었...^^) 또한 상당히 빠른 압축 해제 속도를 가지고 있습니다. (펜티엄 133에서 초당 10 MB 정도)<br />
<br />
커맨드 라인에서 간단하게 "upx <압축할 실행파일의 경로와 이름>" 을 입력 하세요.<br />
<br />
라자루스로 만든 간단한 GUI 어플리케이션의 경우 strip과 upx를 사용한 후 크기는 다음과 같습니다. <br />
* 리눅스 상에서는 ~ 700kb <br />
* 윈도우 상에서는 ~ 420kb<br />
<br />
그렇다고 UPX가 꼭 좋은 것은 아닙니다. UPX에 대한 좀 더 자세한 이야기는 [[Size Matters|크기문제]]에 대한 페이지를 참고하세요.<br />
<br />
또 한가지 주목해야 할 사실은, 라자루스의 "hello world" 프로그램은 그 자체로 이미 다음에 나열된 많은 기능들을 포함하고 있다는 것 입니다.<br />
<br />
* XML 제어 라이브러리<br />
* png, xpm, bmp 그리고 ico 파일을 다루는 이미지 라이브러리<br />
* 라자루스 컴포넌트 라이브러리의 위젯 대부분<br />
* 프리 파스칼 런타일 라이브러리 전체<br />
<br />
큰 크기의 실행파일 이면에는, 사실 이렇게 실제 어플리케이션이 필요로 하는 대부분의 기능들이 이미 들어 있습니다. <br />
<br />
라자루스 실행파일의 크기는 처음에는 매우 크지만 아주 조금씩 늘어나게 되는데, 이는 프리파스칼 컴파일러와 라자루스가 폼을 다루는 방식 때문 입니다. C++ 프로젝트의 경우 (뭐 다른 언어들도 마찬가지 입니다만) "hello world" 프로그램은 처음에는 매우 작지만 조금만 복잡한 기능을 추가하면, 그 크기가 급격하게 늘어나게 됩니다. <br />
<br />
[[Image:Lazarus_vs_cpp.png]]<br />
<br />
=== 윈도 환경에서 링킹이 오래 걸리는 이유는? ===<br />
<br />
이 문제는 FPC 2.2 와 라자루스 0.9.24 부터 해결되었습니다. 업데이트 하세요. 이후 설명은 이전 버전에 대한 것 입니다.<br />
<br />
Generally speaking, compilation on Windows takes more time then other platforms because the GNU Linker utilized by Free Pascal is slow on this platform. This problem only affects Windows, and is only bad on relatively old computers (less then 1Ghz) and computers with little RAM (128MB or less).<br />
<br />
Also, if you smartlink LCL the linking will be much slower. A study about this is located here: [[File size and smartlinking]]<br />
<br />
A internal linker was developed, and is ready, but will only be available when Free Pascal 2.2 is released (of course it's also available via subversion). It decreases the linking time dramatically.<br />
<br />
'''Note''': In 2.1.1 Windows uses an internal linker for win32/64/ce which speeds the process up a bit. A Lazarus recompile then eats about 280MB.<br />
<br />
=== Do I need ppc386.cfg or fpc.cfg? ===<br />
<br />
You only need fpc.cfg. This way the compiler knows where to find the libraries.<br />
<br />
=== lazarus 는 어떻게 컴파일하나요? ===<br />
<br />
다음과 같이 하세요:<br />
$ cd lazarus<br />
$ make clean all<br />
<br />
=== LCL 을 이용한 다른 프로젝트는 어떻게 빌드할 수 있나요? ===<br />
<br />
프로그램을 만드는데 IDE 를 사용할 수 없다면, lazbuild 를 사용하세요. 이것은 lazarus 프로젝트 및 패키지를 만들기 위한 명령행 버전입니다.<br />
LCL 프로그램을 IDE 나 lazbuild 없이 만들려면 다음 행을 ''fpc.cfg'' 끝에 추가하세요.<br />
<br />
# searchpath for other toolkits (Linux)<br />
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/{YourToolKit}<br />
<br />
# searchpath for other toolkits (Windows)<br />
-Fu/{YourLazarusDirectory}/components/units/{YourToolKit}<br />
<br />
:Where {YourToolKit} may be ''gtk2'', ''gnome'', ''qt'' or ''win32'' and run:<br />
::ppc386 your.project.pp<br />
<br />
'''Hint:''' Don't forget to install the development packages for your toolkit otherwise you might a receive something like: [[Linker message: cannot find -l]].<br />
<br />
=== What version of FPC is required? ===<br />
<br />
2.0.4 for MacOSX and 2.2.2 for all other systems. Warning: The 2.2.0 has a bug under MacOSX with case sensitive filenames.<br />
You can also use the svn version of fpc 2.2.3 and 2.3.x.<br />
<br />
=== I can't compile Lazarus ===<br />
<br />
# Check if the compiler has the correct version<br />
# Check if the (fpc)libraries are from the same version.<br />
# Check if you have a fpc.cfg and no old ppc386.cfg<br />
# Check also the OS-dependent FAQs<br />
<br />
=== When I try to compile a project, I have an error ===<br />
==== "Cannot find Unit interfaces". How can I solve this?====<br />
It means the compiler can not find the file 'interfaces.ppu' '''or''' it means it found one, but it is wrong or outdated.<br />
<br />
This unit can be found in {LazarusDir}\lcl\units\{TargetCPU}-{TargetOS}\{LCLWidgetSet}\interfaces.ppu. For example: /home/username/lazarus/lcl/units/i386-linux/gtk/interfaces.ppu.<br />
<br />
Make sure, it is only there. If you have multiple versions of interfaces.ppu, then you probably have a wrong configuration (for instance you added a lcl directory to a search path). Remove all interfaces.ppu, but the one in the directory above.<br />
<br />
If you selected a different widgetset than you used to build lazarus, you need to build the LCL for this widgetset. <br />
<br />
If it is there, but you get this error, you are using a different compiler / rtl for compiling your project than you used for compiling your Lazarus IDE. You can do one of the following<br />
* Rebuild the LCL (or Lazarus completely) with the compiler selected in the Environmnent Options. You can do this with Tools -> Build Lazarus. Before doing this, check the current settings in Tools -> Configure Build Lazarus.<br />
* Change the compiler in the Environment Options to the one you used to compile Lazarus. Look carefully also in the Environment Options to see if you are using the correct paths for the Lazarus Directory and the FPC sources directory. Check that there is only one version of the compiler configuration file fpc.cfg - it should reside in /etc/ for Linux/Unix systems or in the same directory as the fpc compiler for Windows systems. Try to run "fpc -vt bogus" to check which fpc.cfg is being used in your system. Rogue copies often creep in if you have updated your compiler to a new version; they may be found in your home directory or in the same directory as the one in which you built your new compiler. DELETE THESE!!<br />
* You may also try to change the widgetset currently selected for the project. For example, the sample project "objectinspector" that comes with Lazarus is set to gtk by default. Compiling this project will surely give you "Can't find unit interfaces" in Windows platform. Changing widgetset to default(Win32) in Project | Compiler Options... | LCL Widget Type (various) should fix this issue.<br />
<br />
=== When I try to compile delphi projects under lazarus, I have an error ===<br />
==== at the line :{$R *.DFM} How can I solve this problem ? ====<br />
<br />
Lazarus (or better Linux) doesn't know about resources, so you can't use them in the way Delphi/Win32 does. However Lazarus uses a method pretty compatible with this. You can still use your Delphi layouts (.dfm files) if you use the following steps:<br />
<br />
*You need a textual version of the .dfm files. D5 and higher are doing this as default. If you have older files: ALT-F12 to see the layout as text and paste/copy. When you have a text .dfm file, just copy it to a .lfm file.<br />
*Create a file with lazres (in lazarus/tools) lazres yourform.lrs yourform.lfm<br />
*Add the following initialization section to<br />
<br />
initialization<br />
{$I yourform.lrs}<br />
<br />
Please keep in mind that not all properties in the dfm are supported yet by<br />
lazarus, so you might get a crash.<br />
<br />
==== 'Identifier not found LazarusResources'. ====<br />
<br />
When creating a form Lazarus automaticaly add some extra units to the uses section of your form unit. During the conversion of a delphi unit to a Lazarus unit this does not happen. So you need to add LResources to the Uses section of your form unit.<br />
<br />
=== When accessing events of objects e.g. the onclick event of a button I get the following error. ERROR unit not found: stdCtrls ===<br />
<br />
Make sure, in the Project -> Project Inspector, that your project depends on the package 'LCL' and that you have installed the FPC sources.<br />
<br />
Lazarus is the IDE and the visual components library LCL.<br />
All other stuff, like IO, Database, FCL and RTL are provided by FPC.<br />
The IDE needs the paths to all sources.<br />
<br />
The FPC source path can be set via:<br />
Environment -> Environment Options -> Files -> FPC source directory<br />
<br />
===How to embed a small file in the executable, without the need of a separate file? How to embed a resource?===<br />
<br />
For example:<br />
/your/lazarus/path/tools/lazres sound.lrs sound1.wav sound2.wav ...<br />
will create sound.lrs from sound1.wav and sound2.wav.<br />
<br />
Then include it *behind* the form lrs file:<br />
<br />
...<br />
initialization<br />
{$i unit1.lrs} // this is main resource file (first)<br />
{$i sound.lrs} // user defined resource file<br />
<br />
end.<br />
In your program you can then use:<br />
Sound1AsString:=LazarusResources.Find('sound1').Value;<br />
<br />
=== How can I see debug output? ===<br />
<br />
The LCL has in the LCLProc unit two procedures to write debug output. They are named: <br />
* '''DebugLn:''' which works about the same as WriteLn, but accepts only strings.<br />
* '''DbgOut:''' which works about the same as Write, but accepts only strings.<br />
<br />
In normal circumstances the output is written to stdout. If stdout is closed, (for example when the application is {$AppType Gui} or compiled with -WG on Windows), no output is written.<br />
<br />
Debug output can also be written to file. The initialization code of the LCLProc unit checks Lazarus.exe's command line parameters for '--debug-log=<file>'. On finding this parameter any subsequent debug output is sent to <file>.<br />
<br />
If no '--debug-log' command line parameter has been given, it next checks if an operating system environment variable xxx_debuglog exists, where xxx is the program file name without extension. For Lazarus this would be lazarus_debuglog. If such an environment variable exists, it uses the file specified in the lazarus_debuglog environment variable as file to receive debug output. Example: if you do:<br />
set lazarus_debuglog=c:\lazarus\debug.txt<br />
debug output will be written to c:\lazarus\debug.txt.<br />
<br />
Since this is implemented in lclproc, every application using lclproc, can use this output facility.<br />
<br />
;Debuging Lazarus : Most useful for Windows: If you want output on a console, add {$APPTYPE console} to lazarus.pp ; Then rebuild Lazarus.<br />
<br />
=== What is the meaning of the various file extensions used by Lazarus? ===<br />
<br />
The [[Lazarus Tutorial#The Lazarus files]] explains some extensions by an example.<br />
Here is a brief list:<br />
<br />
; <code>*.lpi</code> : Lazarus Project Information file (stored in XML; contains project-specific settings)<br />
; <code>*.lpr</code> : Lazarus Program file; contains Pascal source of main program<br />
; <code>*.lfm</code> : Lazarus Form file; contains configuration information for all objects on a form (stored in a Lazarus-specific textual format; the actions are described by Pascal source code in a corresponding <code>*.pas</code> file)<br />
; <code>*.pas</code> or <code>*.pp</code> : Unit with Pascal code (typically for a form stored in a corresponding <code>*.lfm</code> file)<br />
; <code>*.lrs</code> : Lazarus Resource file (this is a generated file; not to be confused with a Windows resource file). <br />
: This file can be created with lazres tool (in directory Lazarus/Tools) using commandline: lazres myfile.lrs myfile.lfm<br />
; <code>*.ppu</code> : Compiled unit<br />
; <code>*.lpk</code> : Lazarus package information file. (stored in XML; contains package-specific settings)<br />
<br />
=== I have fixed/improved lazarus. How can I add my changes to the official lazarus source? ===<br />
Create a patch and send it to the developers. For details see [[Creating A Patch]].<br />
=== When I do ''var mytext: text;'' to declare a text file, I get "Unit1.pas(32,15) Error: Error in type definition". How can I fix this?===<br />
The TControl class has a [[doc:lcl/controls/tcontrol.text.html|Text]] property. In a method of a form, that has higher visibility, the [[doc:rtl/system/text.html|Text]] type from the system unit. You can use the [[doc:rtl/system/textfile.html|TextFile]] type, which is just an alias for the Text type or you can add the unit to the type definition.<br />
var<br />
MyTextFile: TextFile;<br />
MyText: System.Text;<br />
A similar name clash exists with assigning and closing a text file. TForm has a ''assign'' and a [[doc:lcl/forms/tcustomform.close.html|Close]] method. You can use [[doc:rtl/objpas/assignfile.html|AssignFile]] and [[doc:rtl/objpas/closefile.html|CloseFile]] or add the unit name ''System''.<br />
<br />
=== I get an error when using Printer.BeginDoc ===<br />
<br />
The unit Printers must be added to the uses section.<br />
<br />
The Printer4Lazarus package must be added to your project requirement in the IDE under:<br />
Project|Project Inspector|Add|New Requirement|Package Name:<br />
<br />
If the package Printer4Lazarus package is not in the list when opening the dropdown box it must be installed. The package is part of the Lazarus installation and can be found in:<br />
[lazarus installed directory]\components\printers<br />
<br />
If you used the default installation directories [lazarus installed directory] is:<br />
*Windows: c:\lazarus <br />
*Linux: /usr/lib/lazarus<br />
<br />
The same solution also applies to the exception you can get when referencing Printer.Printers<br />
<br />
=== Why are TForm.ClientWidth/ClientHeight the same as TForm.Width/Height ===<br />
<br />
The TForm.Width/Height do no include the frame, because there was no way to retrieve the frame size on all platforms. Without a reliable way, the LCL would move the forms around on the screen or resize them endlessly.<br />
<br />
Eventually when there is a reliable way to get the size and position of a window with its frame on all platforms, then it will be changed. To keep compatibility with older LCL forms, a version number and some extra methods will be added.<br />
<br />
=== I created a Patch to dock the IDE Messages form on the "Source Code Editor" form (at bottom) ===<br />
<br />
Such patches will not be applied, because they only implement a small part of the needed docking. The goal is to create a complete dock manager and use that. A complete dock manager can dock all IDE windows and it allows to let the user define how to dock. For example dock the messages window above or below the source editor or ... or not at all. For instance:<br />
<br />
<pre><br />
+-------------------++--+<br />
|menu || |<br />
+-------------------+| |<br />
+--++---------------+| |<br />
|PI|| Source Editor ||CE|<br />
+--+| || |<br />
+--+| || |<br />
| |+---------------++--+<br />
|OI|+-------------------+<br />
| ||messages |<br />
+--++-------------------+<br />
</pre><br />
<br />
The dock manager can store the layout and restore it on next load. Preferably the dock manager can dock in pages too. The dock manager does not need to use drag and drop.<br />
All patches implementing docking without a dock manager makes it harder to implement a real dock manager and will be rejected.<br />
<br />
=== How can I become a developer lazarus and access management in the SVN and bug-tracker? ===<br />
<br />
First of all: you must learn about Lazarus, to prove your knowledge and skill.<br />
Start by reading the [[Lazarus_Documentation|wiki articles]], read the Lazarus source code, giving a look at the [http://www.lazarus.freepascal.org/mantis Lazarus Bug-Tracker], fix some bugs, and if you think you are ready, contact the developers on the [http://www.mail-archive.com/lazarus@miraclec.com mailing list].<br />
<br />
== Where is ... defined ==<br />
<br />
=== Virtual key constants ===<br />
Virtual key constants are defined in LCLType. Add LCLtype to your <b>uses</b>.<br />
<br />
== Using the IDE ==<br />
<br />
=== How can I use "identifier completion"? ===<br />
You can invoke identifier completion by pressing [ctrl][space].<br />
Under the menu item ''Environment -> Editor Options -> Code Tools -> Automatic Features'' you can set how quick this should happen automatically.<br />
<br />
== Linux ==<br />
<br />
=== How can I debug on Linux without the IDE? ===<br />
<br />
First of all you need a debugger. gdb is the standard debugger under linux and<br />
there are several GUI-frontends available. One common frontend is ddd, which is<br />
part of most common distributions. To compile lazarus/lcl with debug-information<br />
you should then use the following commands to start a debug session:<br />
<br />
$ make clean; make OPT=-dDEBUG<br />
$ ddd lazarus<br />
<br />
Be warned however, that ddd is not as comfortable as e.g. the Lazarus debugger.<br />
Specially if it comes to view the contents of a variable you have to take into<br />
account that ddd/gdb are case sensitive whereas Pascal is case-insensitive.<br />
Therefore you have to type all variable names in uppercase to see their<br />
contents. For more information take a look into the fpc-manuals.<br />
<br />
=== I can debug now but ddd does not find my sources or complains that they contain no code. Whats that? ===<br />
<br />
This is a path-related problem with either gdb or ddd. You can aviod this by<br />
<br />
* 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't use the source of the program you started with (e.g. lazarus). Thus it may be neccessary to change the directory multiple times.<br />
* In ddd goto [Edit] [gdb-settings] and set the search-path<br />
* Create a $(HOME)/.gdbinit file like:<br />
directory /your/path/to/lazarus<br />
directory /your/path/to/lazarus/lcl<br />
directory /your/path/to/lazarus/lcl/include<br />
<br />
=== I receive an error during the linking that states /usr/bin/ld can't find -l<some lib> ===<br />
<br />
; '''Package Based Distributions''' : You need to install the package that provides the lib<somelib>.so or lib<somelib>.a 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). <br />
: Some distributions have commands to find which package contains a file:<br />
: '''Mandriva'''<br />
<br />
[]$ urpmf lib<somelib>.so<br />
<br />
:will list all packages containing the file named lib<somelib>.so, you'll have to install those ending in -devel<br />
<br />
: '''Debian'''<br />
<br />
:install the apt-file utility (apt-get install apt-file) then<br />
<br />
[]$ apt-file search lib<somelib>.so<br />
<br />
:will list all packages containing the file named lib<somelib>.so, you'll have to install those ending in -dev<br />
<br />
<br />
<br />
; '''Source Based Distributions and Manual Compilation (LFS)''' : Make sure that there is a lib<somelib>.a 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>.a to lib<some lib><version>-x,y.a).<br />
<br />
; '''FreeBSD''' : As source based distro's, and also 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. You might stumble on this problem, since FPC requires the "-less" ones, you will need to symlink them like this:<br />
<br />
[]# cd /usr/local/lib && ln -s libglib-12.so libglib12.so<br />
[]# cd /usr/X11R6/lib && ln -s libgtk-12.so libgtk12.so<br />
[]# cd /usr/X11R6/lib && ln -s libgdk-12.so libgdk12.so<br />
<br />
; '''NetBSD''' : As source based distro's, and also make sure you have -Fl/usr/pkg/lib in your fpc.cfg and/or Lazarus library path<br />
<br />
=== How can I convert a kylix 2 project into a lazarus project? ===<br />
<br />
Nearly the same way as converting a Kylix project into a Delphi/VCL project.<br />
<br />
The LCL (Lazarus Component Library) tries to be compatible to Delphis VCL.<br />
Kylix CLX tries to be QT compatible.<br />
Here are some general hints:<br />
<br />
* Rename all used CLX Q-units like QForms, QControls, QGraphics, ... into their VCL counterparts: Forms, Controls, Graphics, ...<br />
* Add LResources to the uses section of every form source<br />
* Rename or copy all .xfm files to .lfm files.<br />
* Rename or copy .dpr file to .lpr file.<br />
* Add "Interfaces" to the uses section in the .lpr file.<br />
* Remove {$R *.res} directive<br />
* Remove {$R *.xfm} directive<br />
* Add {$mode objfpc}{$H+} or {$mode delphi}{$H+} directive to .pas and .lpr files<br />
* Add an initialization section to the end of each form source and add an include directive for the .lrs file (lazarus resource file):<br />
initialization<br />
{$I unit1.lrs}<br />
:The .lrs files can be created via the lazres tool in: (lazarusdir)/tools/lazres.<br />
:For example: ./lazres unit1.lrs unit1.lfm<br />
<br />
* Fix the differences. The LCL does not yet support every property of the VCL and the CLX is not fully VCL compatible.<br />
<br />
* 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)<br />
<br />
=== When compiling lazarus the compiler can not find a unit. e.g.: gtkint.pp(17,16) Fatal: Can't find unit GLIB ===<br />
<br />
1. Check a clean rebuild: do a 'make clean all'<br />
<br />
2. Check if the compiler has the correct version (2.0.4 or higher)<br />
<br />
3. Check if the compiler is using the right config file. The normal installation creates /etc/fpc.cfg. But fpc also searches for ~/.ppc386.cfg, ~/.fpc.cfg, /etc/ppc386.cfg and it uses only the first it finds.<br />
<br />
:'''Hint:''' You can see which config file is used with 'ppc386 -vt bogus'<br />
:Remove any ppc386.cfg as it is really obsolete.<br />
<br />
4. Check if the config file (/etc/fpc.cfg) contains the right paths to your fpc libs. There must be three lines like this:<br />
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget<br />
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/rtl<br />
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/*<br />
: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/... .<br />
:'''Hint:''' You can see your searchpaths with 'ppc386 -vt bogus'<br />
<br />
5. Check that the config file (/etc/fpc.cfg) does not contain search paths to the lcl source files (.pp, .pas):<br />
forbidden: -Fu(lazarus_source_directory)/lcl<br />
forbidden: -Fu(lazarus_source_directory)/lcl/interfaces/gtk<br />
:If you want to add the lcl for all your fpc projects, make sure that the two paths look like the following and are placed after the above fpc lib paths:<br />
-Fu(lazarus_source_directory)/lcl/units/$fpctarget<br />
-Fu(lazarus_source_directory)/lcl/units/$fpctarget/gtk<br />
<br />
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.<br />
<br />
7. Check if the sources are in a 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.<br />
<br />
8. If you are still not succeeded try to use samplecfg script as follows:<br />
<br />
''#'' cd /usr/lib/fpc/''version''/<br />
<br />
''#'' sudo ./samplecfg /usr/lib/fpc/''\$version'' /etc<br />
<br />
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 a file - /etc/fpc.cfg - not the folder /etc/fpc.cfg.<br />
<br />
=== I have installed the binary version, but when compiling a simple project, lazarus gives: Fatal: Can't find unit CONTROLS ===<br />
<br />
Probably you are using a newer fpc package, than that used for building the<br />
lazarus binaries. The best solution is to download the sources and compile<br />
lazarus manually. You can download the source snapshot or get the source<br />
via svn:<br />
<br />
$ bash<br />
$ svn checkout http://svn.freepascal.org/svn/lazarus/trunk lazarus<br />
$ cd lazarus<br />
$ make clean all<br />
<br />
Make sure that lazarus get the new source directory:<br />
Environment->General Options->Files->Lazarus Directory Top<br />
<br />
===Lazarus compiles, but linking fails with: libgdk-pixbuf not found===<br />
Install the gdk-pixbuf library for gtk1.x:<br />
<br />
Where to find the gdk-pixbuf library:<br />
<br />
RPMs:<br />
http://rpmfind.net/linux/rpm2html/search.php?query=gdk-pixbuf&submit=Search+...&system=&arch=<br />
<br />
Debian packages:<br />
libgdk-pixbuf-dev<br />
<br />
Sources:<br />
ftp://ftp.gnome.org/pub/gnome/unstable/sources/gdk-pixbuf/<br />
<br />
===I have SuSE and I get /usr/bin/ld: cannot find -lgtk Error: Error while linking===<br />
SuSE installs the gtk devel libs under /opt/gnome/lib (or /opt/gnome/lib64 for 64 bits), which is not in<br />
the standard lib path. Simply add it to your /etc/fpc.cfg.<br />
(-Fl/opt/gnome/lib).<br />
<br />
===Lazarus crashes with runtime error 211 after I installed a component===<br />
After I installed a component, Lazarus crashes with the following message:<br />
Threading has been used before cthreads was initialized.<br />
Make cthreads one of the first units in your uses clause.<br />
Runtime error 211 at $0066E188<br />
How can I fix this?<br />
<br />
Your freshly installed component is using threads. FPC on *nix doesn't automatically include threading support, but it must be intialized. This initialization is done in the cthreads unit. Every application using the component needs to add this unit to the uses clause of the main program. Lazarus itself is no exception. This can be done in two ways:<br />
<br />
1) Open the package. In the package editor click on ''Options''. Under page ''Usage'' add to the ''custom'' options '''-dUseCThreads'''. Then rebuild the IDE. This way the cthreads unit will be automatically used by the IDE under unix and the cthreads are initialized.<br />
<br />
2) In order to avoid modifying package, a fpc compiler option could be used directly. Open menu Tools->Configure "build Lazarus". Configure "build Lazarus" dialog will be shown, in field "Options:" type -Facthreads and then press "OK" button. The next step is to install the package. Lazarus will be built with option -Facthreads which means that it will treat main program as if unit cthreads where first in uses clause. <br />
<br />
''Hint:'' Maybe your old (non-crashing) lazarus executable is stored as lazarus.old in the same directory as the crashing lazarus executable.<br />
<br />
See also [[Multithreaded_Application_Tutorial#Units_needed_for_a_multithreaded_application]]<br />
<br />
===When I run a program with threads I get runtime error 232===<br />
The complete error message is:<br />
This binary has no thread support compiled in.<br />
Recompile the application with a thread-driver in the program uses<br />
clause before other units using thread.<br />
Runtime error 232<br />
'''Solution''': Add cthreads as first unit to the uses clause of your main program, usually the .lpr-file.<br />
<br />
===I have Ubuntu Breezy and my fonts in Lazarus IDE look too big===<br />
If Lazarus is compiled with Gtk1.2, the settings in Gnome Preferences/Font don't have any effect as<br />
they are related to Gtk2.<br />
You could try this solution:<br />
Create a file named .gtkrc.mine in your home directory (if it's not already there) and add<br />
these lines to it:<br />
<br />
<pre><br />
style "default-text" {<br />
fontset = "-*-arial-medium-r-normal--*-100-*-*-*-*-iso8859-1,\<br />
-*-helvetica-medium-r-normal--*-100-*-*-*-*-*-*"<br />
}<br />
<br />
class "GtkWidget" style "default-text"<br />
</pre><br />
<br />
If this is not enough try and create also a .gtkrc symlink to .gtkrc.mine . It worked in this way under Xubuntu 7.10.<br />
<br />
===How can my gtk programs use custom rc files?===<br />
<br />
Option a)<br />
Name the rc file ''yourprogram.gtkrc'' and put it in the same directory where the executable is.<br />
<br />
Option b)<br />
Use unit ''GtkInt'' and call ''GTKWidgetSet.SetRCFilename('your_preferred_rc_file');''<br />
Best done before ''Application.Initialize'' in the .lpr file with ''{$IFDEF LCLGtk}''.<br />
<br />
===I have Ubuntu and I cannot compile for Gtk2 due to missing libraries===<br />
Ubuntu has a problem with not creating all the symbolic links that you'll need even when the libraries are installed. Make sure that all missing libraries when trying to link for Gtk2 have their appropriate links. For instance, you might need to do:<br />
<br />
<pre><br />
cd /usr/lib<br />
sudo ln -s libgdk-x11-2.0.so.0 libgtk-x11-2.0.so<br />
</pre><br />
<br />
Make sure that the [whatever].so symbolic links are created and point to the actual libraries.<br />
<br />
===How can I compile a program for Gtk2?===<br />
<br />
At the moment, the Gtk2 compiled IDE is a little unstable, but you can compile software for Gtk2 using the Gtk1 IDE.<br />
<br />
To start with recompile LCL for Gtk2. Go to the menu "Tools"->"Configure Build Lazarus" and set LCL to clean+build and everything else to none.<br />
<br />
Now click Ok and go to the menu "Tools"->"Build Lazarus"<br />
<br />
Now you can compile your software with Gtk2 going on the Compiler options and changing the widgetset to Gtk2.<br />
<br />
===I get this message: "[WARNING] ** Multibyte character encodings (like UTF8) are not supported at the moment."===<br />
<br />
Since revision 10535 (0.9.21) this message doesn't exist anymore. <br />
Previously it was used to warn that a UTF-8 encoding was used. The internal keyhandling routines for the gtk1 widgetset couldn't handle such encoding for keypresses, with the result that keypresses with for instance accented chars were not or wrong detected.<br />
<br />
(original text for older versions of lazarus)<br><br />
<strike><br />
This warning message indicates that your locale enconding is set to utf-8. If you are using Gtk 1 this can be a serious problem and prevent the correct working of Lazarus or software created with Lazarus.<br />
<br />
To work around this, just change your locale to a non utf-8 before executing the program on the command line, like this:<br />
<br />
<pre><br />
export LC_CTYPE="pt_BR"<br />
export LANG="pt_BR"<br />
export LANGUAGE="pt_BR"<br />
./lazarus<br />
</pre><br />
<br />
Substitute pt_BR with the locale for your country. You can create a script to automate this.<br />
</strike><br />
<br />
== Windows ==<br />
<br />
=== When I cycle the compiler, I get:The name specified is not recognized as an internal or external command, operable program or batch file.>& was unexpected at this time. ===<br />
<br />
In the compiler directory there is an OS2 scriptfile named make.cmd. Different versions of Windows also see this as a script file, so remove it since what is needed for OS2 becomes a hindrance on Windows.<br />
<br />
=== When I cycle the compiler, I get: make[3]: ./ppc1.exe: Command not found ===<br />
<br />
I don't know why but somehow make has lost its path. Try to cycle with a<br />
basedir set like: make cycle BASEDIR=your_fpc_source_dir_herecompiler<br />
<br />
=== When I try to make Lazarus I get:===<br />
====make.exe: * * * interfaces: No such file or directory (ENOENT). Stop.make.exe: * * * [interfaces_all] Error 2 ====<br />
You need to upgrade your make.<br />
<br />
====makefile:27: *** You need the GNU utils package to use this Makefile. Stop.====<br />
Make sure you didn't install FPC in a path with spaces in the name. The<br />
Makefile doesn't support it.<br />
<br />
<br />
<br />
===How can I give my program an XP look like lazarus has?===<br />
Project -> Project Options -> Check 'Use manifest to enables themes'.<br />
<br />
===When I run Windows program created in Lazarus it starts with a DOS window===<br />
Specify the -WG argument (Windows GUI) on the command line of the compiler or in the Lazarus IDE check the Windows GUI check box on the compiler options dialog box (Project menu -> Compiler Options -> Linking -> target OS Specific options.<br />
<br />
== Mac OS X ==<br />
<br />
=== 'unknown section attribute: no_dead_strip'라는 메시지와 함께 프로젝트 컴파일에 실패하는 이유는?===<br />
<br />
죽은 코드(Dead code) 제거 기능이 Xcode 1.5이전의 어셈블러와 링커에서는 지원하지 않습니다(Mac OS X 10.3.9버전에서 사용하는). 다음 컴파일 옵션을 꺼 주세요.<br />
<br />
*Code > Unit style > Smart linkable (-CX) <br />
*and Linking > Link Style > Link smart (-XX)<br />
<br />
== Licensing ==<br />
<br />
=== Can I make commercial applications with Lazarus ? ===<br />
<br />
Yes, the LCL is licensed under the LGPL with an exception, which allows you to link to it statically without releasing the source of your application. Modifications and enhancements to the LCL must be distributed with source. Lazarus, the IDE, is licensed under the GPL.<br />
<br />
=== Why are some components restricted from usage in commercial application ? ===<br />
<br />
Lazarus comes with additional components, that were developed by third parties. Those are under various other Licenses. If you wish to use them you need to see the License within the source files of those packages.<br />
Most of those 3rd party components are in the directory "components".<br />
<br />
=== How do I know if a Component is part of the LCL ? ===<br />
<br />
All LCL units are in the directory "lcl". A List of units belonging to the LCL can be found here http://lazarus-ccr.sourceforge.net/docs/lcl/ . If you code uses units not listed on this page, you may have used a component that is not part of the LCL.<br />
<br />
=== Can I make commercial plug-ins for Lazarus ? ===<br />
<br />
Yes, the IDEIntf part of the IDE is licensed under the LGPL with the same exception, so that shared data structures in this part will not force you to license your plug-in or design-time package under the GPL. You are free to choose a plug-in of any license; we don't want to limit your choice. Therefore non-GPL compatible plug-ins are allowed. Note that it's not allowed to distribute a precompiled Lazarus with these non-GPL-compatible plugins included statically; however, we do not see this as a severe limitation, since recompiling Lazarus is easy.<br />
<br />
== Contributors and Comments ==<br />
<br />
This page has been converted from the epikwiki [http://lazarus-ccr.sourceforge.net/index.php?wiki=LazarusFaq version].</div>Kurishinhttps://wiki.freepascal.org/index.php?title=Lazarus_Faq/ko&diff=44643Lazarus Faq/ko2010-09-06T00:06:20Z<p>Kurishin: /* How do I build other projects based upon the LCL */</p>
<hr />
<div>{{Lazarus Faq}}<br />
<br />
이 문서는 원래 www.lazarus.freepascal.org 에 있던 것 입니다. 관리 및 확장 면에서 위키가 훨씬 더 유용하기 때문에 이 곳으로 복사되었습니다. <br />
<br />
== 일반적인 이야기 ==<br />
<br />
=== 더 많은 FAQ를 볼 수 있는 곳은 어디인가요? ===<br />
See the [http://www.lazarus.freepascal.org official website]. There is another FAQ as well.<br />
<br />
===도대체 실행파일의 크기가 왜 이렇게 큰 겁니까?===<br />
실행파일의 크기가 큰 이유는 GDB (GNU Debugger) 를 사용하기 위한 많은 정보들을 포함하고 있기 때문입니다. <br />
<br />
컴파일러에 이 디버깅 정보를 제거하기 위한 옵션 (-Xs) 이 있습니다만, 버전 2.0.2 이전의 컴파일러는 이 기능에 버그가 있기 때문에 제대로 동작하지 않습니다. 이 버그는 현재 개발버전에서는 수정되었습니다. <br />
<br />
"strip" 이라는 이름의 프로그램을 사용하면 실행파일로 부터 디버그 심볼을 삭제할 수 있습니다. 이 프로그램은 lazarus\pp\bin\i386-win32\ 에 있습니다. <br />
<br />
커맨드 라인에서 간단하게 "strip --strip-all <대상 실행파일의 경로와 이름>" 을 입력 하세요.<br />
<br />
실행파일을 좀 더 작게 만들려면, [http://upx.sourceforge.net/ UPX] 가 좋은 해법이 될 것입니다. UPX는 정말 멋진 실행파일 압축기 로서, 압축 해제에 추가적인 메모리가 필요없는 알고리즘을 사용합니다. (역자 주: 이 압축 알고리즘은 [http://www.oberhumer.com/opensource/lzo/ LZO] 라고 불리며, 오래 전 셀빅의 카마수트라 라는 어플에서 사용되었...^^) 또한 상당히 빠른 압축 해제 속도를 가지고 있습니다. (펜티엄 133에서 초당 10 MB 정도)<br />
<br />
커맨드 라인에서 간단하게 "upx <압축할 실행파일의 경로와 이름>" 을 입력 하세요.<br />
<br />
라자루스로 만든 간단한 GUI 어플리케이션의 경우 strip과 upx를 사용한 후 크기는 다음과 같습니다. <br />
* 리눅스 상에서는 ~ 700kb <br />
* 윈도우 상에서는 ~ 420kb<br />
<br />
그렇다고 UPX가 꼭 좋은 것은 아닙니다. UPX에 대한 좀 더 자세한 이야기는 [[Size Matters|크기문제]]에 대한 페이지를 참고하세요.<br />
<br />
또 한가지 주목해야 할 사실은, 라자루스의 "hello world" 프로그램은 그 자체로 이미 다음에 나열된 많은 기능들을 포함하고 있다는 것 입니다.<br />
<br />
* XML 제어 라이브러리<br />
* png, xpm, bmp 그리고 ico 파일을 다루는 이미지 라이브러리<br />
* 라자루스 컴포넌트 라이브러리의 위젯 대부분<br />
* 프리 파스칼 런타일 라이브러리 전체<br />
<br />
큰 크기의 실행파일 이면에는, 사실 이렇게 실제 어플리케이션이 필요로 하는 대부분의 기능들이 이미 들어 있습니다. <br />
<br />
라자루스 실행파일의 크기는 처음에는 매우 크지만 아주 조금씩 늘어나게 되는데, 이는 프리파스칼 컴파일러와 라자루스가 폼을 다루는 방식 때문 입니다. C++ 프로젝트의 경우 (뭐 다른 언어들도 마찬가지 입니다만) "hello world" 프로그램은 처음에는 매우 작지만 조금만 복잡한 기능을 추가하면, 그 크기가 급격하게 늘어나게 됩니다. <br />
<br />
[[Image:Lazarus_vs_cpp.png]]<br />
<br />
=== 윈도 환경에서 링킹이 오래 걸리는 이유는? ===<br />
<br />
이 문제는 FPC 2.2 와 라자루스 0.9.24 부터 해결되었습니다. 업데이트 하세요. 이후 설명은 이전 버전에 대한 것 입니다.<br />
<br />
Generally speaking, compilation on Windows takes more time then other platforms because the GNU Linker utilized by Free Pascal is slow on this platform. This problem only affects Windows, and is only bad on relatively old computers (less then 1Ghz) and computers with little RAM (128MB or less).<br />
<br />
Also, if you smartlink LCL the linking will be much slower. A study about this is located here: [[File size and smartlinking]]<br />
<br />
A internal linker was developed, and is ready, but will only be available when Free Pascal 2.2 is released (of course it's also available via subversion). It decreases the linking time dramatically.<br />
<br />
'''Note''': In 2.1.1 Windows uses an internal linker for win32/64/ce which speeds the process up a bit. A Lazarus recompile then eats about 280MB.<br />
<br />
=== Do I need ppc386.cfg or fpc.cfg? ===<br />
<br />
You only need fpc.cfg. This way the compiler knows where to find the libraries.<br />
<br />
=== lazarus 는 어떻게 컴파일하나요? ===<br />
<br />
다음과 같이 하세요:<br />
$ cd lazarus<br />
$ make clean all<br />
<br />
=== LCL 을 이용한 다른 프로젝트는 어떻게 빌드할 수 있나요? ===<br />
<br />
프로그램을 만드는데 IDE 를 사용할 수 없다면, lazbuild 를 사용하세요. 이것은 lazarus 프로젝트 및 패키지를 만들기 위한 명령행 버전입니다.<br />
LCL 프로그램을 IDE 나 lazbuild 없이 만들려면 다음 행을 ''fpc.cfg'' 끝에 추가하세요.<br />
<br />
# searchpath for other toolkits (Linux)<br />
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/{YourToolKit}<br />
<br />
# searchpath for other toolkits (Windows)<br />
-Fu/{YourLazarusDirectory}/components/units/{YourToolKit}<br />
<br />
:Where {YourToolKit} may be ''gtk2'', ''gnome'', ''qt'' or ''win32'' and run:<br />
::ppc386 your.project.pp<br />
<br />
'''Hint:''' Don't forget to install the development packages for your toolkit otherwise you might a receive something like: [[Linker message: cannot find -l]].<br />
<br />
=== What version of FPC is required? ===<br />
<br />
2.0.4 for MacOSX and 2.2.2 for all other systems. Warning: The 2.2.0 has a bug under MacOSX with case sensitive filenames.<br />
You can also use the svn version of fpc 2.2.3 and 2.3.x.<br />
<br />
=== I can't compile Lazarus ===<br />
<br />
# Check if the compiler has the correct version<br />
# Check if the (fpc)libraries are from the same version.<br />
# Check if you have a fpc.cfg and no old ppc386.cfg<br />
# Check also the OS-dependent FAQs<br />
<br />
=== When I try to compile a project, I have an error ===<br />
==== "Cannot find Unit interfaces". How can I solve this?====<br />
It means the compiler can not find the file 'interfaces.ppu' '''or''' it means it found one, but it is wrong or outdated.<br />
<br />
This unit can be found in {LazarusDir}\lcl\units\{TargetCPU}-{TargetOS}\{LCLWidgetSet}\interfaces.ppu. For example: /home/username/lazarus/lcl/units/i386-linux/gtk/interfaces.ppu.<br />
<br />
Make sure, it is only there. If you have multiple versions of interfaces.ppu, then you probably have a wrong configuration (for instance you added a lcl directory to a search path). Remove all interfaces.ppu, but the one in the directory above.<br />
<br />
If you selected a different widgetset than you used to build lazarus, you need to build the LCL for this widgetset. <br />
<br />
If it is there, but you get this error, you are using a different compiler / rtl for compiling your project than you used for compiling your Lazarus IDE. You can do one of the following<br />
* Rebuild the LCL (or Lazarus completely) with the compiler selected in the Environmnent Options. You can do this with Tools -> Build Lazarus. Before doing this, check the current settings in Tools -> Configure Build Lazarus.<br />
* Change the compiler in the Environment Options to the one you used to compile Lazarus. Look carefully also in the Environment Options to see if you are using the correct paths for the Lazarus Directory and the FPC sources directory. Check that there is only one version of the compiler configuration file fpc.cfg - it should reside in /etc/ for Linux/Unix systems or in the same directory as the fpc compiler for Windows systems. Try to run "fpc -vt bogus" to check which fpc.cfg is being used in your system. Rogue copies often creep in if you have updated your compiler to a new version; they may be found in your home directory or in the same directory as the one in which you built your new compiler. DELETE THESE!!<br />
* You may also try to change the widgetset currently selected for the project. For example, the sample project "objectinspector" that comes with Lazarus is set to gtk by default. Compiling this project will surely give you "Can't find unit interfaces" in Windows platform. Changing widgetset to default(Win32) in Project | Compiler Options... | LCL Widget Type (various) should fix this issue.<br />
<br />
=== When I try to compile delphi projects under lazarus, I have an error ===<br />
==== at the line :{$R *.DFM} How can I solve this problem ? ====<br />
<br />
Lazarus (or better Linux) doesn't know about resources, so you can't use them in the way Delphi/Win32 does. However Lazarus uses a method pretty compatible with this. You can still use your Delphi layouts (.dfm files) if you use the following steps:<br />
<br />
*You need a textual version of the .dfm files. D5 and higher are doing this as default. If you have older files: ALT-F12 to see the layout as text and paste/copy. When you have a text .dfm file, just copy it to a .lfm file.<br />
*Create a file with lazres (in lazarus/tools) lazres yourform.lrs yourform.lfm<br />
*Add the following initialization section to<br />
<br />
initialization<br />
{$I yourform.lrs}<br />
<br />
Please keep in mind that not all properties in the dfm are supported yet by<br />
lazarus, so you might get a crash.<br />
<br />
==== 'Identifier not found LazarusResources'. ====<br />
<br />
When creating a form Lazarus automaticaly add some extra units to the uses section of your form unit. During the conversion of a delphi unit to a Lazarus unit this does not happen. So you need to add LResources to the Uses section of your form unit.<br />
<br />
=== When accessing events of objects e.g. the onclick event of a button I get the following error. ERROR unit not found: stdCtrls ===<br />
<br />
Make sure, in the Project -> Project Inspector, that your project depends on the package 'LCL' and that you have installed the FPC sources.<br />
<br />
Lazarus is the IDE and the visual components library LCL.<br />
All other stuff, like IO, Database, FCL and RTL are provided by FPC.<br />
The IDE needs the paths to all sources.<br />
<br />
The FPC source path can be set via:<br />
Environment -> Environment Options -> Files -> FPC source directory<br />
<br />
===How to embed a small file in the executable, without the need of a separate file? How to embed a resource?===<br />
<br />
For example:<br />
/your/lazarus/path/tools/lazres sound.lrs sound1.wav sound2.wav ...<br />
will create sound.lrs from sound1.wav and sound2.wav.<br />
<br />
Then include it *behind* the form lrs file:<br />
<br />
...<br />
initialization<br />
{$i unit1.lrs} // this is main resource file (first)<br />
{$i sound.lrs} // user defined resource file<br />
<br />
end.<br />
In your program you can then use:<br />
Sound1AsString:=LazarusResources.Find('sound1').Value;<br />
<br />
=== How can I see debug output? ===<br />
<br />
The LCL has in the LCLProc unit two procedures to write debug output. They are named: <br />
* '''DebugLn:''' which works about the same as WriteLn, but accepts only strings.<br />
* '''DbgOut:''' which works about the same as Write, but accepts only strings.<br />
<br />
In normal circumstances the output is written to stdout. If stdout is closed, (for example when the application is {$AppType Gui} or compiled with -WG on Windows), no output is written.<br />
<br />
Debug output can also be written to file. The initialization code of the LCLProc unit checks Lazarus.exe's command line parameters for '--debug-log=<file>'. On finding this parameter any subsequent debug output is sent to <file>.<br />
<br />
If no '--debug-log' command line parameter has been given, it next checks if an operating system environment variable xxx_debuglog exists, where xxx is the program file name without extension. For Lazarus this would be lazarus_debuglog. If such an environment variable exists, it uses the file specified in the lazarus_debuglog environment variable as file to receive debug output. Example: if you do:<br />
set lazarus_debuglog=c:\lazarus\debug.txt<br />
debug output will be written to c:\lazarus\debug.txt.<br />
<br />
Since this is implemented in lclproc, every application using lclproc, can use this output facility.<br />
<br />
;Debuging Lazarus : Most useful for Windows: If you want output on a console, add {$APPTYPE console} to lazarus.pp ; Then rebuild Lazarus.<br />
<br />
=== What is the meaning of the various file extensions used by Lazarus? ===<br />
<br />
The [[Lazarus Tutorial#The Lazarus files]] explains some extensions by an example.<br />
Here is a brief list:<br />
<br />
; <code>*.lpi</code> : Lazarus Project Information file (stored in XML; contains project-specific settings)<br />
; <code>*.lpr</code> : Lazarus Program file; contains Pascal source of main program<br />
; <code>*.lfm</code> : Lazarus Form file; contains configuration information for all objects on a form (stored in a Lazarus-specific textual format; the actions are described by Pascal source code in a corresponding <code>*.pas</code> file)<br />
; <code>*.pas</code> or <code>*.pp</code> : Unit with Pascal code (typically for a form stored in a corresponding <code>*.lfm</code> file)<br />
; <code>*.lrs</code> : Lazarus Resource file (this is a generated file; not to be confused with a Windows resource file). <br />
: This file can be created with lazres tool (in directory Lazarus/Tools) using commandline: lazres myfile.lrs myfile.lfm<br />
; <code>*.ppu</code> : Compiled unit<br />
; <code>*.lpk</code> : Lazarus package information file. (stored in XML; contains package-specific settings)<br />
<br />
=== I have fixed/improved lazarus. How can I add my changes to the official lazarus source? ===<br />
Create a patch and send it to the developers. For details see [[Creating A Patch]].<br />
=== When I do ''var mytext: text;'' to declare a text file, I get "Unit1.pas(32,15) Error: Error in type definition". How can I fix this?===<br />
The TControl class has a [[doc:lcl/controls/tcontrol.text.html|Text]] property. In a method of a form, that has higher visibility, the [[doc:rtl/system/text.html|Text]] type from the system unit. You can use the [[doc:rtl/system/textfile.html|TextFile]] type, which is just an alias for the Text type or you can add the unit to the type definition.<br />
var<br />
MyTextFile: TextFile;<br />
MyText: System.Text;<br />
A similar name clash exists with assigning and closing a text file. TForm has a ''assign'' and a [[doc:lcl/forms/tcustomform.close.html|Close]] method. You can use [[doc:rtl/objpas/assignfile.html|AssignFile]] and [[doc:rtl/objpas/closefile.html|CloseFile]] or add the unit name ''System''.<br />
<br />
=== I get an error when using Printer.BeginDoc ===<br />
<br />
The unit Printers must be added to the uses section.<br />
<br />
The Printer4Lazarus package must be added to your project requirement in the IDE under:<br />
Project|Project Inspector|Add|New Requirement|Package Name:<br />
<br />
If the package Printer4Lazarus package is not in the list when opening the dropdown box it must be installed. The package is part of the Lazarus installation and can be found in:<br />
[lazarus installed directory]\components\printers<br />
<br />
If you used the default installation directories [lazarus installed directory] is:<br />
*Windows: c:\lazarus <br />
*Linux: /usr/lib/lazarus<br />
<br />
The same solution also applies to the exception you can get when referencing Printer.Printers<br />
<br />
=== Why are TForm.ClientWidth/ClientHeight the same as TForm.Width/Height ===<br />
<br />
The TForm.Width/Height do no include the frame, because there was no way to retrieve the frame size on all platforms. Without a reliable way, the LCL would move the forms around on the screen or resize them endlessly.<br />
<br />
Eventually when there is a reliable way to get the size and position of a window with its frame on all platforms, then it will be changed. To keep compatibility with older LCL forms, a version number and some extra methods will be added.<br />
<br />
=== I created a Patch to dock the IDE Messages form on the "Source Code Editor" form (at bottom) ===<br />
<br />
Such patches will not be applied, because they only implement a small part of the needed docking. The goal is to create a complete dock manager and use that. A complete dock manager can dock all IDE windows and it allows to let the user define how to dock. For example dock the messages window above or below the source editor or ... or not at all. For instance:<br />
<br />
<pre><br />
+-------------------++--+<br />
|menu || |<br />
+-------------------+| |<br />
+--++---------------+| |<br />
|PI|| Source Editor ||CE|<br />
+--+| || |<br />
+--+| || |<br />
| |+---------------++--+<br />
|OI|+-------------------+<br />
| ||messages |<br />
+--++-------------------+<br />
</pre><br />
<br />
The dock manager can store the layout and restore it on next load. Preferably the dock manager can dock in pages too. The dock manager does not need to use drag and drop.<br />
All patches implementing docking without a dock manager makes it harder to implement a real dock manager and will be rejected.<br />
<br />
=== How can I become a developer lazarus and access management in the SVN and bug-tracker? ===<br />
<br />
First of all: you must learn about Lazarus, to prove your knowledge and skill.<br />
Start by reading the [[Lazarus_Documentation|wiki articles]], read the Lazarus source code, giving a look at the [http://www.lazarus.freepascal.org/mantis Lazarus Bug-Tracker], fix some bugs, and if you think you are ready, contact the developers on the [http://www.mail-archive.com/lazarus@miraclec.com mailing list].<br />
<br />
== Where is ... defined ==<br />
<br />
=== Virtual key constants ===<br />
Virtual key constants are defined in LCLType. Add LCLtype to your <b>uses</b>.<br />
<br />
== Using the IDE ==<br />
<br />
=== How can I use "identifier completion"? ===<br />
You can invoke identifier completion by pressing [ctrl][space].<br />
Under the menu item ''Environment -> Editor Options -> Code Tools -> Automatic Features'' you can set how quick this should happen automatically.<br />
<br />
== Linux ==<br />
<br />
=== How can I debug on Linux without the IDE? ===<br />
<br />
First of all you need a debugger. gdb is the standard debugger under linux and<br />
there are several GUI-frontends available. One common frontend is ddd, which is<br />
part of most common distributions. To compile lazarus/lcl with debug-information<br />
you should then use the following commands to start a debug session:<br />
<br />
$ make clean; make OPT=-dDEBUG<br />
$ ddd lazarus<br />
<br />
Be warned however, that ddd is not as comfortable as e.g. the Lazarus debugger.<br />
Specially if it comes to view the contents of a variable you have to take into<br />
account that ddd/gdb are case sensitive whereas Pascal is case-insensitive.<br />
Therefore you have to type all variable names in uppercase to see their<br />
contents. For more information take a look into the fpc-manuals.<br />
<br />
=== I can debug now but ddd does not find my sources or complains that they contain no code. Whats that? ===<br />
<br />
This is a path-related problem with either gdb or ddd. You can aviod this by<br />
<br />
* 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't use the source of the program you started with (e.g. lazarus). Thus it may be neccessary to change the directory multiple times.<br />
* In ddd goto [Edit] [gdb-settings] and set the search-path<br />
* Create a $(HOME)/.gdbinit file like:<br />
directory /your/path/to/lazarus<br />
directory /your/path/to/lazarus/lcl<br />
directory /your/path/to/lazarus/lcl/include<br />
<br />
=== I receive an error during the linking that states /usr/bin/ld can't find -l<some lib> ===<br />
<br />
; '''Package Based Distributions''' : You need to install the package that provides the lib<somelib>.so or lib<somelib>.a 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). <br />
: Some distributions have commands to find which package contains a file:<br />
: '''Mandriva'''<br />
<br />
[]$ urpmf lib<somelib>.so<br />
<br />
:will list all packages containing the file named lib<somelib>.so, you'll have to install those ending in -devel<br />
<br />
: '''Debian'''<br />
<br />
:install the apt-file utility (apt-get install apt-file) then<br />
<br />
[]$ apt-file search lib<somelib>.so<br />
<br />
:will list all packages containing the file named lib<somelib>.so, you'll have to install those ending in -dev<br />
<br />
<br />
<br />
; '''Source Based Distributions and Manual Compilation (LFS)''' : Make sure that there is a lib<somelib>.a 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>.a to lib<some lib><version>-x,y.a).<br />
<br />
; '''FreeBSD''' : As source based distro's, and also 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. You might stumble on this problem, since FPC requires the "-less" ones, you will need to symlink them like this:<br />
<br />
[]# cd /usr/local/lib && ln -s libglib-12.so libglib12.so<br />
[]# cd /usr/X11R6/lib && ln -s libgtk-12.so libgtk12.so<br />
[]# cd /usr/X11R6/lib && ln -s libgdk-12.so libgdk12.so<br />
<br />
; '''NetBSD''' : As source based distro's, and also make sure you have -Fl/usr/pkg/lib in your fpc.cfg and/or Lazarus library path<br />
<br />
=== How can I convert a kylix 2 project into a lazarus project? ===<br />
<br />
Nearly the same way as converting a Kylix project into a Delphi/VCL project.<br />
<br />
The LCL (Lazarus Component Library) tries to be compatible to Delphis VCL.<br />
Kylix CLX tries to be QT compatible.<br />
Here are some general hints:<br />
<br />
* Rename all used CLX Q-units like QForms, QControls, QGraphics, ... into their VCL counterparts: Forms, Controls, Graphics, ...<br />
* Add LResources to the uses section of every form source<br />
* Rename or copy all .xfm files to .lfm files.<br />
* Rename or copy .dpr file to .lpr file.<br />
* Add "Interfaces" to the uses section in the .lpr file.<br />
* Remove {$R *.res} directive<br />
* Remove {$R *.xfm} directive<br />
* Add {$mode objfpc}{$H+} or {$mode delphi}{$H+} directive to .pas and .lpr files<br />
* Add an initialization section to the end of each form source and add an include directive for the .lrs file (lazarus resource file):<br />
initialization<br />
{$I unit1.lrs}<br />
:The .lrs files can be created via the lazres tool in: (lazarusdir)/tools/lazres.<br />
:For example: ./lazres unit1.lrs unit1.lfm<br />
<br />
* Fix the differences. The LCL does not yet support every property of the VCL and the CLX is not fully VCL compatible.<br />
<br />
* 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)<br />
<br />
=== When compiling lazarus the compiler can not find a unit. e.g.: gtkint.pp(17,16) Fatal: Can't find unit GLIB ===<br />
<br />
1. Check a clean rebuild: do a 'make clean all'<br />
<br />
2. Check if the compiler has the correct version (2.0.4 or higher)<br />
<br />
3. Check if the compiler is using the right config file. The normal installation creates /etc/fpc.cfg. But fpc also searches for ~/.ppc386.cfg, ~/.fpc.cfg, /etc/ppc386.cfg and it uses only the first it finds.<br />
<br />
:'''Hint:''' You can see which config file is used with 'ppc386 -vt bogus'<br />
:Remove any ppc386.cfg as it is really obsolete.<br />
<br />
4. Check if the config file (/etc/fpc.cfg) contains the right paths to your fpc libs. There must be three lines like this:<br />
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget<br />
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/rtl<br />
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/*<br />
: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/... .<br />
:'''Hint:''' You can see your searchpaths with 'ppc386 -vt bogus'<br />
<br />
5. Check that the config file (/etc/fpc.cfg) does not contain search paths to the lcl source files (.pp, .pas):<br />
forbidden: -Fu(lazarus_source_directory)/lcl<br />
forbidden: -Fu(lazarus_source_directory)/lcl/interfaces/gtk<br />
:If you want to add the lcl for all your fpc projects, make sure that the two paths look like the following and are placed after the above fpc lib paths:<br />
-Fu(lazarus_source_directory)/lcl/units/$fpctarget<br />
-Fu(lazarus_source_directory)/lcl/units/$fpctarget/gtk<br />
<br />
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.<br />
<br />
7. Check if the sources are in a 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.<br />
<br />
8. If you are still not succeeded try to use samplecfg script as follows:<br />
<br />
''#'' cd /usr/lib/fpc/''version''/<br />
<br />
''#'' sudo ./samplecfg /usr/lib/fpc/''\$version'' /etc<br />
<br />
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 a file - /etc/fpc.cfg - not the folder /etc/fpc.cfg.<br />
<br />
=== I have installed the binary version, but when compiling a simple project, lazarus gives: Fatal: Can't find unit CONTROLS ===<br />
<br />
Probably you are using a newer fpc package, than that used for building the<br />
lazarus binaries. The best solution is to download the sources and compile<br />
lazarus manually. You can download the source snapshot or get the source<br />
via svn:<br />
<br />
$ bash<br />
$ svn checkout http://svn.freepascal.org/svn/lazarus/trunk lazarus<br />
$ cd lazarus<br />
$ make clean all<br />
<br />
Make sure that lazarus get the new source directory:<br />
Environment->General Options->Files->Lazarus Directory Top<br />
<br />
===Lazarus compiles, but linking fails with: libgdk-pixbuf not found===<br />
Install the gdk-pixbuf library for gtk1.x:<br />
<br />
Where to find the gdk-pixbuf library:<br />
<br />
RPMs:<br />
http://rpmfind.net/linux/rpm2html/search.php?query=gdk-pixbuf&submit=Search+...&system=&arch=<br />
<br />
Debian packages:<br />
libgdk-pixbuf-dev<br />
<br />
Sources:<br />
ftp://ftp.gnome.org/pub/gnome/unstable/sources/gdk-pixbuf/<br />
<br />
===I have SuSE and I get /usr/bin/ld: cannot find -lgtk Error: Error while linking===<br />
SuSE installs the gtk devel libs under /opt/gnome/lib (or /opt/gnome/lib64 for 64 bits), which is not in<br />
the standard lib path. Simply add it to your /etc/fpc.cfg.<br />
(-Fl/opt/gnome/lib).<br />
<br />
===Lazarus crashes with runtime error 211 after I installed a component===<br />
After I installed a component, Lazarus crashes with the following message:<br />
Threading has been used before cthreads was initialized.<br />
Make cthreads one of the first units in your uses clause.<br />
Runtime error 211 at $0066E188<br />
How can I fix this?<br />
<br />
Your freshly installed component is using threads. FPC on *nix doesn't automatically include threading support, but it must be intialized. This initialization is done in the cthreads unit. Every application using the component needs to add this unit to the uses clause of the main program. Lazarus itself is no exception. This can be done in two ways:<br />
<br />
1) Open the package. In the package editor click on ''Options''. Under page ''Usage'' add to the ''custom'' options '''-dUseCThreads'''. Then rebuild the IDE. This way the cthreads unit will be automatically used by the IDE under unix and the cthreads are initialized.<br />
<br />
2) In order to avoid modifying package, a fpc compiler option could be used directly. Open menu Tools->Configure "build Lazarus". Configure "build Lazarus" dialog will be shown, in field "Options:" type -Facthreads and then press "OK" button. The next step is to install the package. Lazarus will be built with option -Facthreads which means that it will treat main program as if unit cthreads where first in uses clause. <br />
<br />
''Hint:'' Maybe your old (non-crashing) lazarus executable is stored as lazarus.old in the same directory as the crashing lazarus executable.<br />
<br />
See also [[Multithreaded_Application_Tutorial#Units_needed_for_a_multithreaded_application]]<br />
<br />
===When I run a program with threads I get runtime error 232===<br />
The complete error message is:<br />
This binary has no thread support compiled in.<br />
Recompile the application with a thread-driver in the program uses<br />
clause before other units using thread.<br />
Runtime error 232<br />
'''Solution''': Add cthreads as first unit to the uses clause of your main program, usually the .lpr-file.<br />
<br />
===I have Ubuntu Breezy and my fonts in Lazarus IDE look too big===<br />
If Lazarus is compiled with Gtk1.2, the settings in Gnome Preferences/Font don't have any effect as<br />
they are related to Gtk2.<br />
You could try this solution:<br />
Create a file named .gtkrc.mine in your home directory (if it's not already there) and add<br />
these lines to it:<br />
<br />
<pre><br />
style "default-text" {<br />
fontset = "-*-arial-medium-r-normal--*-100-*-*-*-*-iso8859-1,\<br />
-*-helvetica-medium-r-normal--*-100-*-*-*-*-*-*"<br />
}<br />
<br />
class "GtkWidget" style "default-text"<br />
</pre><br />
<br />
If this is not enough try and create also a .gtkrc symlink to .gtkrc.mine . It worked in this way under Xubuntu 7.10.<br />
<br />
===How can my gtk programs use custom rc files?===<br />
<br />
Option a)<br />
Name the rc file ''yourprogram.gtkrc'' and put it in the same directory where the executable is.<br />
<br />
Option b)<br />
Use unit ''GtkInt'' and call ''GTKWidgetSet.SetRCFilename('your_preferred_rc_file');''<br />
Best done before ''Application.Initialize'' in the .lpr file with ''{$IFDEF LCLGtk}''.<br />
<br />
===I have Ubuntu and I cannot compile for Gtk2 due to missing libraries===<br />
Ubuntu has a problem with not creating all the symbolic links that you'll need even when the libraries are installed. Make sure that all missing libraries when trying to link for Gtk2 have their appropriate links. For instance, you might need to do:<br />
<br />
<pre><br />
cd /usr/lib<br />
sudo ln -s libgdk-x11-2.0.so.0 libgtk-x11-2.0.so<br />
</pre><br />
<br />
Make sure that the [whatever].so symbolic links are created and point to the actual libraries.<br />
<br />
===How can I compile a program for Gtk2?===<br />
<br />
At the moment, the Gtk2 compiled IDE is a little unstable, but you can compile software for Gtk2 using the Gtk1 IDE.<br />
<br />
To start with recompile LCL for Gtk2. Go to the menu "Tools"->"Configure Build Lazarus" and set LCL to clean+build and everything else to none.<br />
<br />
Now click Ok and go to the menu "Tools"->"Build Lazarus"<br />
<br />
Now you can compile your software with Gtk2 going on the Compiler options and changing the widgetset to Gtk2.<br />
<br />
===I get this message: "[WARNING] ** Multibyte character encodings (like UTF8) are not supported at the moment."===<br />
<br />
Since revision 10535 (0.9.21) this message doesn't exist anymore. <br />
Previously it was used to warn that a UTF-8 encoding was used. The internal keyhandling routines for the gtk1 widgetset couldn't handle such encoding for keypresses, with the result that keypresses with for instance accented chars were not or wrong detected.<br />
<br />
(original text for older versions of lazarus)<br><br />
<strike><br />
This warning message indicates that your locale enconding is set to utf-8. If you are using Gtk 1 this can be a serious problem and prevent the correct working of Lazarus or software created with Lazarus.<br />
<br />
To work around this, just change your locale to a non utf-8 before executing the program on the command line, like this:<br />
<br />
<pre><br />
export LC_CTYPE="pt_BR"<br />
export LANG="pt_BR"<br />
export LANGUAGE="pt_BR"<br />
./lazarus<br />
</pre><br />
<br />
Substitute pt_BR with the locale for your country. You can create a script to automate this.<br />
</strike><br />
<br />
== Windows ==<br />
<br />
=== When I cycle the compiler, I get:The name specified is not recognized as an internal or external command, operable program or batch file.>& was unexpected at this time. ===<br />
<br />
In the compiler directory there is an OS2 scriptfile named make.cmd. Different versions of Windows also see this as a script file, so remove it since what is needed for OS2 becomes a hindrance on Windows.<br />
<br />
=== When I cycle the compiler, I get: make[3]: ./ppc1.exe: Command not found ===<br />
<br />
I don't know why but somehow make has lost its path. Try to cycle with a<br />
basedir set like: make cycle BASEDIR=your_fpc_source_dir_herecompiler<br />
<br />
=== When I try to make Lazarus I get:===<br />
====make.exe: * * * interfaces: No such file or directory (ENOENT). Stop.make.exe: * * * [interfaces_all] Error 2 ====<br />
You need to upgrade your make.<br />
<br />
====makefile:27: *** You need the GNU utils package to use this Makefile. Stop.====<br />
Make sure you didn't install FPC in a path with spaces in the name. The<br />
Makefile doesn't support it.<br />
<br />
<br />
<br />
===How can I give my program an XP look like lazarus has?===<br />
Project -> Project Options -> Check 'Use manifest to enables themes'.<br />
<br />
===When I run Windows program created in Lazarus it starts with a DOS window===<br />
Specify the -WG argument (Windows GUI) on the command line of the compiler or in the Lazarus IDE check the Windows GUI check box on the compiler options dialog box (Project menu -> Compiler Options -> Linking -> target OS Specific options.<br />
<br />
== Mac OS X ==<br />
<br />
=== 'unknown section attribute: no_dead_strip'라는 메시지와 함께 프로젝트 컴파일에 실패하는 이유는?===<br />
<br />
죽은 코드(Dead code) 제거 기능이 Xcode 1.5이전의 어셈블러와 링커에서는 지원하지 않습니다(Mac OS X 10.3.9버전에서 사용하는). 다음 컴파일 옵션을 꺼 주세요.<br />
<br />
*Code > Unit style > Smart linkable (-CX) <br />
*and Linking > Link Style > Link smart (-XX)<br />
<br />
== Licensing ==<br />
<br />
=== Can I make commercial applications with Lazarus ? ===<br />
<br />
Yes, the LCL is licensed under the LGPL with an exception, which allows you to link to it statically without releasing the source of your application. Modifications and enhancements to the LCL must be distributed with source. Lazarus, the IDE, is licensed under the GPL.<br />
<br />
=== Why are some components restricted from usage in commercial application ? ===<br />
<br />
Lazarus comes with additional components, that were developed by third parties. Those are under various other Licenses. If you wish to use them you need to see the License within the source files of those packages.<br />
Most of those 3rd party components are in the directory "components".<br />
<br />
=== How do I know if a Component is part of the LCL ? ===<br />
<br />
All LCL units are in the directory "lcl". A List of units belonging to the LCL can be found here http://lazarus-ccr.sourceforge.net/docs/lcl/ . If you code uses units not listed on this page, you may have used a component that is not part of the LCL.<br />
<br />
=== Can I make commercial plug-ins for Lazarus ? ===<br />
<br />
Yes, the IDEIntf part of the IDE is licensed under the LGPL with the same exception, so that shared data structures in this part will not force you to license your plug-in or design-time package under the GPL. You are free to choose a plug-in of any license; we don't want to limit your choice. Therefore non-GPL compatible plug-ins are allowed. Note that it's not allowed to distribute a precompiled Lazarus with these non-GPL-compatible plugins included statically; however, we do not see this as a severe limitation, since recompiling Lazarus is easy.<br />
<br />
== Contributors and Comments ==<br />
<br />
This page has been converted from the epikwiki [http://lazarus-ccr.sourceforge.net/index.php?wiki=LazarusFaq version].</div>Kurishinhttps://wiki.freepascal.org/index.php?title=Lazarus_Faq/ko&diff=44642Lazarus Faq/ko2010-09-06T00:01:47Z<p>Kurishin: /* How do I compile lazarus? */</p>
<hr />
<div>{{Lazarus Faq}}<br />
<br />
이 문서는 원래 www.lazarus.freepascal.org 에 있던 것 입니다. 관리 및 확장 면에서 위키가 훨씬 더 유용하기 때문에 이 곳으로 복사되었습니다. <br />
<br />
== 일반적인 이야기 ==<br />
<br />
=== 더 많은 FAQ를 볼 수 있는 곳은 어디인가요? ===<br />
See the [http://www.lazarus.freepascal.org official website]. There is another FAQ as well.<br />
<br />
===도대체 실행파일의 크기가 왜 이렇게 큰 겁니까?===<br />
실행파일의 크기가 큰 이유는 GDB (GNU Debugger) 를 사용하기 위한 많은 정보들을 포함하고 있기 때문입니다. <br />
<br />
컴파일러에 이 디버깅 정보를 제거하기 위한 옵션 (-Xs) 이 있습니다만, 버전 2.0.2 이전의 컴파일러는 이 기능에 버그가 있기 때문에 제대로 동작하지 않습니다. 이 버그는 현재 개발버전에서는 수정되었습니다. <br />
<br />
"strip" 이라는 이름의 프로그램을 사용하면 실행파일로 부터 디버그 심볼을 삭제할 수 있습니다. 이 프로그램은 lazarus\pp\bin\i386-win32\ 에 있습니다. <br />
<br />
커맨드 라인에서 간단하게 "strip --strip-all <대상 실행파일의 경로와 이름>" 을 입력 하세요.<br />
<br />
실행파일을 좀 더 작게 만들려면, [http://upx.sourceforge.net/ UPX] 가 좋은 해법이 될 것입니다. UPX는 정말 멋진 실행파일 압축기 로서, 압축 해제에 추가적인 메모리가 필요없는 알고리즘을 사용합니다. (역자 주: 이 압축 알고리즘은 [http://www.oberhumer.com/opensource/lzo/ LZO] 라고 불리며, 오래 전 셀빅의 카마수트라 라는 어플에서 사용되었...^^) 또한 상당히 빠른 압축 해제 속도를 가지고 있습니다. (펜티엄 133에서 초당 10 MB 정도)<br />
<br />
커맨드 라인에서 간단하게 "upx <압축할 실행파일의 경로와 이름>" 을 입력 하세요.<br />
<br />
라자루스로 만든 간단한 GUI 어플리케이션의 경우 strip과 upx를 사용한 후 크기는 다음과 같습니다. <br />
* 리눅스 상에서는 ~ 700kb <br />
* 윈도우 상에서는 ~ 420kb<br />
<br />
그렇다고 UPX가 꼭 좋은 것은 아닙니다. UPX에 대한 좀 더 자세한 이야기는 [[Size Matters|크기문제]]에 대한 페이지를 참고하세요.<br />
<br />
또 한가지 주목해야 할 사실은, 라자루스의 "hello world" 프로그램은 그 자체로 이미 다음에 나열된 많은 기능들을 포함하고 있다는 것 입니다.<br />
<br />
* XML 제어 라이브러리<br />
* png, xpm, bmp 그리고 ico 파일을 다루는 이미지 라이브러리<br />
* 라자루스 컴포넌트 라이브러리의 위젯 대부분<br />
* 프리 파스칼 런타일 라이브러리 전체<br />
<br />
큰 크기의 실행파일 이면에는, 사실 이렇게 실제 어플리케이션이 필요로 하는 대부분의 기능들이 이미 들어 있습니다. <br />
<br />
라자루스 실행파일의 크기는 처음에는 매우 크지만 아주 조금씩 늘어나게 되는데, 이는 프리파스칼 컴파일러와 라자루스가 폼을 다루는 방식 때문 입니다. C++ 프로젝트의 경우 (뭐 다른 언어들도 마찬가지 입니다만) "hello world" 프로그램은 처음에는 매우 작지만 조금만 복잡한 기능을 추가하면, 그 크기가 급격하게 늘어나게 됩니다. <br />
<br />
[[Image:Lazarus_vs_cpp.png]]<br />
<br />
=== 윈도 환경에서 링킹이 오래 걸리는 이유는? ===<br />
<br />
이 문제는 FPC 2.2 와 라자루스 0.9.24 부터 해결되었습니다. 업데이트 하세요. 이후 설명은 이전 버전에 대한 것 입니다.<br />
<br />
Generally speaking, compilation on Windows takes more time then other platforms because the GNU Linker utilized by Free Pascal is slow on this platform. This problem only affects Windows, and is only bad on relatively old computers (less then 1Ghz) and computers with little RAM (128MB or less).<br />
<br />
Also, if you smartlink LCL the linking will be much slower. A study about this is located here: [[File size and smartlinking]]<br />
<br />
A internal linker was developed, and is ready, but will only be available when Free Pascal 2.2 is released (of course it's also available via subversion). It decreases the linking time dramatically.<br />
<br />
'''Note''': In 2.1.1 Windows uses an internal linker for win32/64/ce which speeds the process up a bit. A Lazarus recompile then eats about 280MB.<br />
<br />
=== Do I need ppc386.cfg or fpc.cfg? ===<br />
<br />
You only need fpc.cfg. This way the compiler knows where to find the libraries.<br />
<br />
=== lazarus 는 어떻게 컴파일하나요? ===<br />
<br />
다음과 같이 하세요:<br />
$ cd lazarus<br />
$ make clean all<br />
<br />
=== How do I build other projects based upon the LCL ===<br />
<br />
If you can't use the IDE to build your applications, use lazbuild. This is a command line version of the IDE to build lazarus projects and packages.<br />
If you want to build LCL applications without the IDE and without the lazbuild, add the following lines to the end of your ''fpc.cfg''<br />
<br />
# searchpath for other toolkits (Linux)<br />
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/{YourToolKit}<br />
<br />
# searchpath for other toolkits (Windows)<br />
-Fu/{YourLazarusDirectory}/components/units/{YourToolKit}<br />
<br />
:Where {YourToolKit} may be ''gtk2'', ''gnome'', ''qt'' or ''win32'' and run:<br />
::ppc386 your.project.pp<br />
<br />
'''Hint:''' Don't forget to install the development packages for your toolkit otherwise you might a receive something like: [[Linker message: cannot find -l]].<br />
<br />
=== What version of FPC is required? ===<br />
<br />
2.0.4 for MacOSX and 2.2.2 for all other systems. Warning: The 2.2.0 has a bug under MacOSX with case sensitive filenames.<br />
You can also use the svn version of fpc 2.2.3 and 2.3.x.<br />
<br />
=== I can't compile Lazarus ===<br />
<br />
# Check if the compiler has the correct version<br />
# Check if the (fpc)libraries are from the same version.<br />
# Check if you have a fpc.cfg and no old ppc386.cfg<br />
# Check also the OS-dependent FAQs<br />
<br />
=== When I try to compile a project, I have an error ===<br />
==== "Cannot find Unit interfaces". How can I solve this?====<br />
It means the compiler can not find the file 'interfaces.ppu' '''or''' it means it found one, but it is wrong or outdated.<br />
<br />
This unit can be found in {LazarusDir}\lcl\units\{TargetCPU}-{TargetOS}\{LCLWidgetSet}\interfaces.ppu. For example: /home/username/lazarus/lcl/units/i386-linux/gtk/interfaces.ppu.<br />
<br />
Make sure, it is only there. If you have multiple versions of interfaces.ppu, then you probably have a wrong configuration (for instance you added a lcl directory to a search path). Remove all interfaces.ppu, but the one in the directory above.<br />
<br />
If you selected a different widgetset than you used to build lazarus, you need to build the LCL for this widgetset. <br />
<br />
If it is there, but you get this error, you are using a different compiler / rtl for compiling your project than you used for compiling your Lazarus IDE. You can do one of the following<br />
* Rebuild the LCL (or Lazarus completely) with the compiler selected in the Environmnent Options. You can do this with Tools -> Build Lazarus. Before doing this, check the current settings in Tools -> Configure Build Lazarus.<br />
* Change the compiler in the Environment Options to the one you used to compile Lazarus. Look carefully also in the Environment Options to see if you are using the correct paths for the Lazarus Directory and the FPC sources directory. Check that there is only one version of the compiler configuration file fpc.cfg - it should reside in /etc/ for Linux/Unix systems or in the same directory as the fpc compiler for Windows systems. Try to run "fpc -vt bogus" to check which fpc.cfg is being used in your system. Rogue copies often creep in if you have updated your compiler to a new version; they may be found in your home directory or in the same directory as the one in which you built your new compiler. DELETE THESE!!<br />
* You may also try to change the widgetset currently selected for the project. For example, the sample project "objectinspector" that comes with Lazarus is set to gtk by default. Compiling this project will surely give you "Can't find unit interfaces" in Windows platform. Changing widgetset to default(Win32) in Project | Compiler Options... | LCL Widget Type (various) should fix this issue.<br />
<br />
=== When I try to compile delphi projects under lazarus, I have an error ===<br />
==== at the line :{$R *.DFM} How can I solve this problem ? ====<br />
<br />
Lazarus (or better Linux) doesn't know about resources, so you can't use them in the way Delphi/Win32 does. However Lazarus uses a method pretty compatible with this. You can still use your Delphi layouts (.dfm files) if you use the following steps:<br />
<br />
*You need a textual version of the .dfm files. D5 and higher are doing this as default. If you have older files: ALT-F12 to see the layout as text and paste/copy. When you have a text .dfm file, just copy it to a .lfm file.<br />
*Create a file with lazres (in lazarus/tools) lazres yourform.lrs yourform.lfm<br />
*Add the following initialization section to<br />
<br />
initialization<br />
{$I yourform.lrs}<br />
<br />
Please keep in mind that not all properties in the dfm are supported yet by<br />
lazarus, so you might get a crash.<br />
<br />
==== 'Identifier not found LazarusResources'. ====<br />
<br />
When creating a form Lazarus automaticaly add some extra units to the uses section of your form unit. During the conversion of a delphi unit to a Lazarus unit this does not happen. So you need to add LResources to the Uses section of your form unit.<br />
<br />
=== When accessing events of objects e.g. the onclick event of a button I get the following error. ERROR unit not found: stdCtrls ===<br />
<br />
Make sure, in the Project -> Project Inspector, that your project depends on the package 'LCL' and that you have installed the FPC sources.<br />
<br />
Lazarus is the IDE and the visual components library LCL.<br />
All other stuff, like IO, Database, FCL and RTL are provided by FPC.<br />
The IDE needs the paths to all sources.<br />
<br />
The FPC source path can be set via:<br />
Environment -> Environment Options -> Files -> FPC source directory<br />
<br />
===How to embed a small file in the executable, without the need of a separate file? How to embed a resource?===<br />
<br />
For example:<br />
/your/lazarus/path/tools/lazres sound.lrs sound1.wav sound2.wav ...<br />
will create sound.lrs from sound1.wav and sound2.wav.<br />
<br />
Then include it *behind* the form lrs file:<br />
<br />
...<br />
initialization<br />
{$i unit1.lrs} // this is main resource file (first)<br />
{$i sound.lrs} // user defined resource file<br />
<br />
end.<br />
In your program you can then use:<br />
Sound1AsString:=LazarusResources.Find('sound1').Value;<br />
<br />
=== How can I see debug output? ===<br />
<br />
The LCL has in the LCLProc unit two procedures to write debug output. They are named: <br />
* '''DebugLn:''' which works about the same as WriteLn, but accepts only strings.<br />
* '''DbgOut:''' which works about the same as Write, but accepts only strings.<br />
<br />
In normal circumstances the output is written to stdout. If stdout is closed, (for example when the application is {$AppType Gui} or compiled with -WG on Windows), no output is written.<br />
<br />
Debug output can also be written to file. The initialization code of the LCLProc unit checks Lazarus.exe's command line parameters for '--debug-log=<file>'. On finding this parameter any subsequent debug output is sent to <file>.<br />
<br />
If no '--debug-log' command line parameter has been given, it next checks if an operating system environment variable xxx_debuglog exists, where xxx is the program file name without extension. For Lazarus this would be lazarus_debuglog. If such an environment variable exists, it uses the file specified in the lazarus_debuglog environment variable as file to receive debug output. Example: if you do:<br />
set lazarus_debuglog=c:\lazarus\debug.txt<br />
debug output will be written to c:\lazarus\debug.txt.<br />
<br />
Since this is implemented in lclproc, every application using lclproc, can use this output facility.<br />
<br />
;Debuging Lazarus : Most useful for Windows: If you want output on a console, add {$APPTYPE console} to lazarus.pp ; Then rebuild Lazarus.<br />
<br />
=== What is the meaning of the various file extensions used by Lazarus? ===<br />
<br />
The [[Lazarus Tutorial#The Lazarus files]] explains some extensions by an example.<br />
Here is a brief list:<br />
<br />
; <code>*.lpi</code> : Lazarus Project Information file (stored in XML; contains project-specific settings)<br />
; <code>*.lpr</code> : Lazarus Program file; contains Pascal source of main program<br />
; <code>*.lfm</code> : Lazarus Form file; contains configuration information for all objects on a form (stored in a Lazarus-specific textual format; the actions are described by Pascal source code in a corresponding <code>*.pas</code> file)<br />
; <code>*.pas</code> or <code>*.pp</code> : Unit with Pascal code (typically for a form stored in a corresponding <code>*.lfm</code> file)<br />
; <code>*.lrs</code> : Lazarus Resource file (this is a generated file; not to be confused with a Windows resource file). <br />
: This file can be created with lazres tool (in directory Lazarus/Tools) using commandline: lazres myfile.lrs myfile.lfm<br />
; <code>*.ppu</code> : Compiled unit<br />
; <code>*.lpk</code> : Lazarus package information file. (stored in XML; contains package-specific settings)<br />
<br />
=== I have fixed/improved lazarus. How can I add my changes to the official lazarus source? ===<br />
Create a patch and send it to the developers. For details see [[Creating A Patch]].<br />
=== When I do ''var mytext: text;'' to declare a text file, I get "Unit1.pas(32,15) Error: Error in type definition". How can I fix this?===<br />
The TControl class has a [[doc:lcl/controls/tcontrol.text.html|Text]] property. In a method of a form, that has higher visibility, the [[doc:rtl/system/text.html|Text]] type from the system unit. You can use the [[doc:rtl/system/textfile.html|TextFile]] type, which is just an alias for the Text type or you can add the unit to the type definition.<br />
var<br />
MyTextFile: TextFile;<br />
MyText: System.Text;<br />
A similar name clash exists with assigning and closing a text file. TForm has a ''assign'' and a [[doc:lcl/forms/tcustomform.close.html|Close]] method. You can use [[doc:rtl/objpas/assignfile.html|AssignFile]] and [[doc:rtl/objpas/closefile.html|CloseFile]] or add the unit name ''System''.<br />
<br />
=== I get an error when using Printer.BeginDoc ===<br />
<br />
The unit Printers must be added to the uses section.<br />
<br />
The Printer4Lazarus package must be added to your project requirement in the IDE under:<br />
Project|Project Inspector|Add|New Requirement|Package Name:<br />
<br />
If the package Printer4Lazarus package is not in the list when opening the dropdown box it must be installed. The package is part of the Lazarus installation and can be found in:<br />
[lazarus installed directory]\components\printers<br />
<br />
If you used the default installation directories [lazarus installed directory] is:<br />
*Windows: c:\lazarus <br />
*Linux: /usr/lib/lazarus<br />
<br />
The same solution also applies to the exception you can get when referencing Printer.Printers<br />
<br />
=== Why are TForm.ClientWidth/ClientHeight the same as TForm.Width/Height ===<br />
<br />
The TForm.Width/Height do no include the frame, because there was no way to retrieve the frame size on all platforms. Without a reliable way, the LCL would move the forms around on the screen or resize them endlessly.<br />
<br />
Eventually when there is a reliable way to get the size and position of a window with its frame on all platforms, then it will be changed. To keep compatibility with older LCL forms, a version number and some extra methods will be added.<br />
<br />
=== I created a Patch to dock the IDE Messages form on the "Source Code Editor" form (at bottom) ===<br />
<br />
Such patches will not be applied, because they only implement a small part of the needed docking. The goal is to create a complete dock manager and use that. A complete dock manager can dock all IDE windows and it allows to let the user define how to dock. For example dock the messages window above or below the source editor or ... or not at all. For instance:<br />
<br />
<pre><br />
+-------------------++--+<br />
|menu || |<br />
+-------------------+| |<br />
+--++---------------+| |<br />
|PI|| Source Editor ||CE|<br />
+--+| || |<br />
+--+| || |<br />
| |+---------------++--+<br />
|OI|+-------------------+<br />
| ||messages |<br />
+--++-------------------+<br />
</pre><br />
<br />
The dock manager can store the layout and restore it on next load. Preferably the dock manager can dock in pages too. The dock manager does not need to use drag and drop.<br />
All patches implementing docking without a dock manager makes it harder to implement a real dock manager and will be rejected.<br />
<br />
=== How can I become a developer lazarus and access management in the SVN and bug-tracker? ===<br />
<br />
First of all: you must learn about Lazarus, to prove your knowledge and skill.<br />
Start by reading the [[Lazarus_Documentation|wiki articles]], read the Lazarus source code, giving a look at the [http://www.lazarus.freepascal.org/mantis Lazarus Bug-Tracker], fix some bugs, and if you think you are ready, contact the developers on the [http://www.mail-archive.com/lazarus@miraclec.com mailing list].<br />
<br />
== Where is ... defined ==<br />
<br />
=== Virtual key constants ===<br />
Virtual key constants are defined in LCLType. Add LCLtype to your <b>uses</b>.<br />
<br />
== Using the IDE ==<br />
<br />
=== How can I use "identifier completion"? ===<br />
You can invoke identifier completion by pressing [ctrl][space].<br />
Under the menu item ''Environment -> Editor Options -> Code Tools -> Automatic Features'' you can set how quick this should happen automatically.<br />
<br />
== Linux ==<br />
<br />
=== How can I debug on Linux without the IDE? ===<br />
<br />
First of all you need a debugger. gdb is the standard debugger under linux and<br />
there are several GUI-frontends available. One common frontend is ddd, which is<br />
part of most common distributions. To compile lazarus/lcl with debug-information<br />
you should then use the following commands to start a debug session:<br />
<br />
$ make clean; make OPT=-dDEBUG<br />
$ ddd lazarus<br />
<br />
Be warned however, that ddd is not as comfortable as e.g. the Lazarus debugger.<br />
Specially if it comes to view the contents of a variable you have to take into<br />
account that ddd/gdb are case sensitive whereas Pascal is case-insensitive.<br />
Therefore you have to type all variable names in uppercase to see their<br />
contents. For more information take a look into the fpc-manuals.<br />
<br />
=== I can debug now but ddd does not find my sources or complains that they contain no code. Whats that? ===<br />
<br />
This is a path-related problem with either gdb or ddd. You can aviod this by<br />
<br />
* 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't use the source of the program you started with (e.g. lazarus). Thus it may be neccessary to change the directory multiple times.<br />
* In ddd goto [Edit] [gdb-settings] and set the search-path<br />
* Create a $(HOME)/.gdbinit file like:<br />
directory /your/path/to/lazarus<br />
directory /your/path/to/lazarus/lcl<br />
directory /your/path/to/lazarus/lcl/include<br />
<br />
=== I receive an error during the linking that states /usr/bin/ld can't find -l<some lib> ===<br />
<br />
; '''Package Based Distributions''' : You need to install the package that provides the lib<somelib>.so or lib<somelib>.a 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). <br />
: Some distributions have commands to find which package contains a file:<br />
: '''Mandriva'''<br />
<br />
[]$ urpmf lib<somelib>.so<br />
<br />
:will list all packages containing the file named lib<somelib>.so, you'll have to install those ending in -devel<br />
<br />
: '''Debian'''<br />
<br />
:install the apt-file utility (apt-get install apt-file) then<br />
<br />
[]$ apt-file search lib<somelib>.so<br />
<br />
:will list all packages containing the file named lib<somelib>.so, you'll have to install those ending in -dev<br />
<br />
<br />
<br />
; '''Source Based Distributions and Manual Compilation (LFS)''' : Make sure that there is a lib<somelib>.a 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>.a to lib<some lib><version>-x,y.a).<br />
<br />
; '''FreeBSD''' : As source based distro's, and also 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. You might stumble on this problem, since FPC requires the "-less" ones, you will need to symlink them like this:<br />
<br />
[]# cd /usr/local/lib && ln -s libglib-12.so libglib12.so<br />
[]# cd /usr/X11R6/lib && ln -s libgtk-12.so libgtk12.so<br />
[]# cd /usr/X11R6/lib && ln -s libgdk-12.so libgdk12.so<br />
<br />
; '''NetBSD''' : As source based distro's, and also make sure you have -Fl/usr/pkg/lib in your fpc.cfg and/or Lazarus library path<br />
<br />
=== How can I convert a kylix 2 project into a lazarus project? ===<br />
<br />
Nearly the same way as converting a Kylix project into a Delphi/VCL project.<br />
<br />
The LCL (Lazarus Component Library) tries to be compatible to Delphis VCL.<br />
Kylix CLX tries to be QT compatible.<br />
Here are some general hints:<br />
<br />
* Rename all used CLX Q-units like QForms, QControls, QGraphics, ... into their VCL counterparts: Forms, Controls, Graphics, ...<br />
* Add LResources to the uses section of every form source<br />
* Rename or copy all .xfm files to .lfm files.<br />
* Rename or copy .dpr file to .lpr file.<br />
* Add "Interfaces" to the uses section in the .lpr file.<br />
* Remove {$R *.res} directive<br />
* Remove {$R *.xfm} directive<br />
* Add {$mode objfpc}{$H+} or {$mode delphi}{$H+} directive to .pas and .lpr files<br />
* Add an initialization section to the end of each form source and add an include directive for the .lrs file (lazarus resource file):<br />
initialization<br />
{$I unit1.lrs}<br />
:The .lrs files can be created via the lazres tool in: (lazarusdir)/tools/lazres.<br />
:For example: ./lazres unit1.lrs unit1.lfm<br />
<br />
* Fix the differences. The LCL does not yet support every property of the VCL and the CLX is not fully VCL compatible.<br />
<br />
* 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)<br />
<br />
=== When compiling lazarus the compiler can not find a unit. e.g.: gtkint.pp(17,16) Fatal: Can't find unit GLIB ===<br />
<br />
1. Check a clean rebuild: do a 'make clean all'<br />
<br />
2. Check if the compiler has the correct version (2.0.4 or higher)<br />
<br />
3. Check if the compiler is using the right config file. The normal installation creates /etc/fpc.cfg. But fpc also searches for ~/.ppc386.cfg, ~/.fpc.cfg, /etc/ppc386.cfg and it uses only the first it finds.<br />
<br />
:'''Hint:''' You can see which config file is used with 'ppc386 -vt bogus'<br />
:Remove any ppc386.cfg as it is really obsolete.<br />
<br />
4. Check if the config file (/etc/fpc.cfg) contains the right paths to your fpc libs. There must be three lines like this:<br />
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget<br />
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/rtl<br />
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/*<br />
: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/... .<br />
:'''Hint:''' You can see your searchpaths with 'ppc386 -vt bogus'<br />
<br />
5. Check that the config file (/etc/fpc.cfg) does not contain search paths to the lcl source files (.pp, .pas):<br />
forbidden: -Fu(lazarus_source_directory)/lcl<br />
forbidden: -Fu(lazarus_source_directory)/lcl/interfaces/gtk<br />
:If you want to add the lcl for all your fpc projects, make sure that the two paths look like the following and are placed after the above fpc lib paths:<br />
-Fu(lazarus_source_directory)/lcl/units/$fpctarget<br />
-Fu(lazarus_source_directory)/lcl/units/$fpctarget/gtk<br />
<br />
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.<br />
<br />
7. Check if the sources are in a 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.<br />
<br />
8. If you are still not succeeded try to use samplecfg script as follows:<br />
<br />
''#'' cd /usr/lib/fpc/''version''/<br />
<br />
''#'' sudo ./samplecfg /usr/lib/fpc/''\$version'' /etc<br />
<br />
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 a file - /etc/fpc.cfg - not the folder /etc/fpc.cfg.<br />
<br />
=== I have installed the binary version, but when compiling a simple project, lazarus gives: Fatal: Can't find unit CONTROLS ===<br />
<br />
Probably you are using a newer fpc package, than that used for building the<br />
lazarus binaries. The best solution is to download the sources and compile<br />
lazarus manually. You can download the source snapshot or get the source<br />
via svn:<br />
<br />
$ bash<br />
$ svn checkout http://svn.freepascal.org/svn/lazarus/trunk lazarus<br />
$ cd lazarus<br />
$ make clean all<br />
<br />
Make sure that lazarus get the new source directory:<br />
Environment->General Options->Files->Lazarus Directory Top<br />
<br />
===Lazarus compiles, but linking fails with: libgdk-pixbuf not found===<br />
Install the gdk-pixbuf library for gtk1.x:<br />
<br />
Where to find the gdk-pixbuf library:<br />
<br />
RPMs:<br />
http://rpmfind.net/linux/rpm2html/search.php?query=gdk-pixbuf&submit=Search+...&system=&arch=<br />
<br />
Debian packages:<br />
libgdk-pixbuf-dev<br />
<br />
Sources:<br />
ftp://ftp.gnome.org/pub/gnome/unstable/sources/gdk-pixbuf/<br />
<br />
===I have SuSE and I get /usr/bin/ld: cannot find -lgtk Error: Error while linking===<br />
SuSE installs the gtk devel libs under /opt/gnome/lib (or /opt/gnome/lib64 for 64 bits), which is not in<br />
the standard lib path. Simply add it to your /etc/fpc.cfg.<br />
(-Fl/opt/gnome/lib).<br />
<br />
===Lazarus crashes with runtime error 211 after I installed a component===<br />
After I installed a component, Lazarus crashes with the following message:<br />
Threading has been used before cthreads was initialized.<br />
Make cthreads one of the first units in your uses clause.<br />
Runtime error 211 at $0066E188<br />
How can I fix this?<br />
<br />
Your freshly installed component is using threads. FPC on *nix doesn't automatically include threading support, but it must be intialized. This initialization is done in the cthreads unit. Every application using the component needs to add this unit to the uses clause of the main program. Lazarus itself is no exception. This can be done in two ways:<br />
<br />
1) Open the package. In the package editor click on ''Options''. Under page ''Usage'' add to the ''custom'' options '''-dUseCThreads'''. Then rebuild the IDE. This way the cthreads unit will be automatically used by the IDE under unix and the cthreads are initialized.<br />
<br />
2) In order to avoid modifying package, a fpc compiler option could be used directly. Open menu Tools->Configure "build Lazarus". Configure "build Lazarus" dialog will be shown, in field "Options:" type -Facthreads and then press "OK" button. The next step is to install the package. Lazarus will be built with option -Facthreads which means that it will treat main program as if unit cthreads where first in uses clause. <br />
<br />
''Hint:'' Maybe your old (non-crashing) lazarus executable is stored as lazarus.old in the same directory as the crashing lazarus executable.<br />
<br />
See also [[Multithreaded_Application_Tutorial#Units_needed_for_a_multithreaded_application]]<br />
<br />
===When I run a program with threads I get runtime error 232===<br />
The complete error message is:<br />
This binary has no thread support compiled in.<br />
Recompile the application with a thread-driver in the program uses<br />
clause before other units using thread.<br />
Runtime error 232<br />
'''Solution''': Add cthreads as first unit to the uses clause of your main program, usually the .lpr-file.<br />
<br />
===I have Ubuntu Breezy and my fonts in Lazarus IDE look too big===<br />
If Lazarus is compiled with Gtk1.2, the settings in Gnome Preferences/Font don't have any effect as<br />
they are related to Gtk2.<br />
You could try this solution:<br />
Create a file named .gtkrc.mine in your home directory (if it's not already there) and add<br />
these lines to it:<br />
<br />
<pre><br />
style "default-text" {<br />
fontset = "-*-arial-medium-r-normal--*-100-*-*-*-*-iso8859-1,\<br />
-*-helvetica-medium-r-normal--*-100-*-*-*-*-*-*"<br />
}<br />
<br />
class "GtkWidget" style "default-text"<br />
</pre><br />
<br />
If this is not enough try and create also a .gtkrc symlink to .gtkrc.mine . It worked in this way under Xubuntu 7.10.<br />
<br />
===How can my gtk programs use custom rc files?===<br />
<br />
Option a)<br />
Name the rc file ''yourprogram.gtkrc'' and put it in the same directory where the executable is.<br />
<br />
Option b)<br />
Use unit ''GtkInt'' and call ''GTKWidgetSet.SetRCFilename('your_preferred_rc_file');''<br />
Best done before ''Application.Initialize'' in the .lpr file with ''{$IFDEF LCLGtk}''.<br />
<br />
===I have Ubuntu and I cannot compile for Gtk2 due to missing libraries===<br />
Ubuntu has a problem with not creating all the symbolic links that you'll need even when the libraries are installed. Make sure that all missing libraries when trying to link for Gtk2 have their appropriate links. For instance, you might need to do:<br />
<br />
<pre><br />
cd /usr/lib<br />
sudo ln -s libgdk-x11-2.0.so.0 libgtk-x11-2.0.so<br />
</pre><br />
<br />
Make sure that the [whatever].so symbolic links are created and point to the actual libraries.<br />
<br />
===How can I compile a program for Gtk2?===<br />
<br />
At the moment, the Gtk2 compiled IDE is a little unstable, but you can compile software for Gtk2 using the Gtk1 IDE.<br />
<br />
To start with recompile LCL for Gtk2. Go to the menu "Tools"->"Configure Build Lazarus" and set LCL to clean+build and everything else to none.<br />
<br />
Now click Ok and go to the menu "Tools"->"Build Lazarus"<br />
<br />
Now you can compile your software with Gtk2 going on the Compiler options and changing the widgetset to Gtk2.<br />
<br />
===I get this message: "[WARNING] ** Multibyte character encodings (like UTF8) are not supported at the moment."===<br />
<br />
Since revision 10535 (0.9.21) this message doesn't exist anymore. <br />
Previously it was used to warn that a UTF-8 encoding was used. The internal keyhandling routines for the gtk1 widgetset couldn't handle such encoding for keypresses, with the result that keypresses with for instance accented chars were not or wrong detected.<br />
<br />
(original text for older versions of lazarus)<br><br />
<strike><br />
This warning message indicates that your locale enconding is set to utf-8. If you are using Gtk 1 this can be a serious problem and prevent the correct working of Lazarus or software created with Lazarus.<br />
<br />
To work around this, just change your locale to a non utf-8 before executing the program on the command line, like this:<br />
<br />
<pre><br />
export LC_CTYPE="pt_BR"<br />
export LANG="pt_BR"<br />
export LANGUAGE="pt_BR"<br />
./lazarus<br />
</pre><br />
<br />
Substitute pt_BR with the locale for your country. You can create a script to automate this.<br />
</strike><br />
<br />
== Windows ==<br />
<br />
=== When I cycle the compiler, I get:The name specified is not recognized as an internal or external command, operable program or batch file.>& was unexpected at this time. ===<br />
<br />
In the compiler directory there is an OS2 scriptfile named make.cmd. Different versions of Windows also see this as a script file, so remove it since what is needed for OS2 becomes a hindrance on Windows.<br />
<br />
=== When I cycle the compiler, I get: make[3]: ./ppc1.exe: Command not found ===<br />
<br />
I don't know why but somehow make has lost its path. Try to cycle with a<br />
basedir set like: make cycle BASEDIR=your_fpc_source_dir_herecompiler<br />
<br />
=== When I try to make Lazarus I get:===<br />
====make.exe: * * * interfaces: No such file or directory (ENOENT). Stop.make.exe: * * * [interfaces_all] Error 2 ====<br />
You need to upgrade your make.<br />
<br />
====makefile:27: *** You need the GNU utils package to use this Makefile. Stop.====<br />
Make sure you didn't install FPC in a path with spaces in the name. The<br />
Makefile doesn't support it.<br />
<br />
<br />
<br />
===How can I give my program an XP look like lazarus has?===<br />
Project -> Project Options -> Check 'Use manifest to enables themes'.<br />
<br />
===When I run Windows program created in Lazarus it starts with a DOS window===<br />
Specify the -WG argument (Windows GUI) on the command line of the compiler or in the Lazarus IDE check the Windows GUI check box on the compiler options dialog box (Project menu -> Compiler Options -> Linking -> target OS Specific options.<br />
<br />
== Mac OS X ==<br />
<br />
=== 'unknown section attribute: no_dead_strip'라는 메시지와 함께 프로젝트 컴파일에 실패하는 이유는?===<br />
<br />
죽은 코드(Dead code) 제거 기능이 Xcode 1.5이전의 어셈블러와 링커에서는 지원하지 않습니다(Mac OS X 10.3.9버전에서 사용하는). 다음 컴파일 옵션을 꺼 주세요.<br />
<br />
*Code > Unit style > Smart linkable (-CX) <br />
*and Linking > Link Style > Link smart (-XX)<br />
<br />
== Licensing ==<br />
<br />
=== Can I make commercial applications with Lazarus ? ===<br />
<br />
Yes, the LCL is licensed under the LGPL with an exception, which allows you to link to it statically without releasing the source of your application. Modifications and enhancements to the LCL must be distributed with source. Lazarus, the IDE, is licensed under the GPL.<br />
<br />
=== Why are some components restricted from usage in commercial application ? ===<br />
<br />
Lazarus comes with additional components, that were developed by third parties. Those are under various other Licenses. If you wish to use them you need to see the License within the source files of those packages.<br />
Most of those 3rd party components are in the directory "components".<br />
<br />
=== How do I know if a Component is part of the LCL ? ===<br />
<br />
All LCL units are in the directory "lcl". A List of units belonging to the LCL can be found here http://lazarus-ccr.sourceforge.net/docs/lcl/ . If you code uses units not listed on this page, you may have used a component that is not part of the LCL.<br />
<br />
=== Can I make commercial plug-ins for Lazarus ? ===<br />
<br />
Yes, the IDEIntf part of the IDE is licensed under the LGPL with the same exception, so that shared data structures in this part will not force you to license your plug-in or design-time package under the GPL. You are free to choose a plug-in of any license; we don't want to limit your choice. Therefore non-GPL compatible plug-ins are allowed. Note that it's not allowed to distribute a precompiled Lazarus with these non-GPL-compatible plugins included statically; however, we do not see this as a severe limitation, since recompiling Lazarus is easy.<br />
<br />
== Contributors and Comments ==<br />
<br />
This page has been converted from the epikwiki [http://lazarus-ccr.sourceforge.net/index.php?wiki=LazarusFaq version].</div>Kurishinhttps://wiki.freepascal.org/index.php?title=IDE_tricks/ko&diff=44283IDE tricks/ko2010-08-27T04:38:00Z<p>Kurishin: /* Getting the compiler command line parameters created by the IDE */</p>
<hr />
<div>{{IDE tricks}}<br />
<br />
= 'Open file'로 새로운 파일 생성하기 =<br />
<br />
새로운 파일을 만들어 저장할 수 있습니다. 또는, 한번의 작업으로 새로운 파일을 파일이름과 파일유형을 지정하여 만들 수 있습니다:<br />
단지 Open File (Ctrl+o) 선택하고 존재하지 않는 파일을 지정합니다. 예를 들어, unit1.pas를 지정할 경우 IDE는 <br />
해당파일을 만들것인지 묻습니다.<br />
<br />
= 사용자 정의 new unit / form =<br />
<br />
0.9.27 버전 부터 'New unit' (New form) 스피드버튼에서 마우스 오른쪽 클릭하고 생성될 파일 유형을 설정할 수 있습니다.<br />
IDEIntF 또는 프로젝트 템플릿 패키지를 통하여 더 많은 파일 유형을 등록할 수 있습니다.<br />
<br />
= IDE macros =<br />
<br />
[[IDE Macros in paths and filenames]]<br />
<br />
= IDE 에서 만들어지는 컴파일러 명령행 인수 알아내기 =<br />
<br />
명령행 인수들은 Project -> Compiler Options -> Show Options 에서 찾을 수 있습니다. 이 곳의 경로는 프로젝트 디렉터리의 상대경로로 표현되므로 대부분 수정없이 사용할 수 있습니다.<br />
<br />
인수들은 *.compiled 파일로도 저장됩니다. 예로, test1.lpi 라는 프로젝트가 있을 때 test1.compiled 파일이 동시에 생성됩니다. 간단한 텍스트 형식의 xml 파일이며 다른 컴퓨터에서 컴파일하기 위해 옵션을 복사하고 경로를 수정할 수 있습니다. 이 파일은 실행파일이 생성된 디렉터리에 들어가게 됩니다.<br />
<br />
패키지에도 똑같이 적용될 수 있습니다.<br />
<br />
이 방법으로, 생성된 소스 코드를 lazarus IDE 외부에서 컴파일 할 수 있습니다.<br />
<br />
= 에디터 창을 한개 제외하고 모두 닫기 =<br />
<br />
gtk 환경(리눅스, 맥OS X, FreeBSD에서 가능)의 소스 에디터 페이지의 경우 각 페이지 이름 오른쪽에 닫기 버튼이 있습니다. Ctrl키와 함께 닫기 버튼을 클릭하면 클릭한 페이지를 제외한 다른 모든 페이지가 닫히게 됩니다.<br />
<br />
= Component palette =<br />
<br />
== Finding a component in the palette ==<br />
<br />
You know the component name, or part of it, but you don't know in which page it was? This tool finds it:<br />
Right click on a component in the palette to open the popup menu. Choose 'Find component'. Type part of the name to filter the list.<br />
<br />
== Open the package of a component in the palette ==<br />
<br />
Right click on the component to open the popup menu, then choose open package.<br />
<br />
== Find the source declaration of a component in the palette ==<br />
<br />
Right click on the component to open the popup menu, then choose open unit.<br />
<br />
= My application freeze my linux desktop while debugging =<br />
<br />
X (your desktop) can freeze, when an application that grabbed the mouse is stopped by gdb (the debugger).<br />
<br />
== Using a second X session ==<br />
<br />
You can start a second X by:<br />
X :1 &<br />
with Ctrl-Alt-F7 you switch to :0 and with Ctrl-Alt-F8 you switch to :1<br />
after that you can start a second gnome session by:<br />
gnome-session --display=:1 &<br />
<br />
== Using VNC ==<br />
<br />
You can use vncserver/client by installing<br />
tightvncserver/realvncserver<br />
Start the server with:<br />
vncserver :1<br />
<br />
AFAIK, a session is also started. You can connect to the vncserver with vncviewer.<br />
<br />
== Debug the application on the second server ==<br />
In lazarus, in the run parameters for your project, check "use display" and enter <br />
:1<br />
<br />
Now your application will run on the second server, so when it is <br />
being debugged, only the second server will freeze (but that won't <br />
affect you since you are debugging on the first).<br />
<br />
= Compiling the IDE fast =<br />
<br />
Working on Lazarus itself needs rebuilding the IDE many times. If you use the following tricks and have enough memory and a recent cpu, you should be able to recompile the IDE in a few seconds.<br />
* Put the Lazarus sources on a fast harddisk. Not on a slow network filesystem.<br />
* Install only needed packages.<br />
* Set USESVN2REVISIONINC=0 to skip the update of the revision.inc.<br />
* Compile only parts. If the packager registration is recompiled, then all installed packages are recompiled too. If the IDEIntf is recompiled, then all installed design-time packages are recompiled.<br />
<br />
= DebugLn of the IDE or a LCL application =<br />
<br />
The IDE writes many useful hints via debugln. Under windows you can get them by starting lazarus with the command line parameter ''--debug-log=filename.txt''. Under Linux/BSD/Mac OS X/Solaris: Just start lazarus in a terminal.<br />
This is a general LCL feature.<br />
<br />
= Finding the source file of an IDE window =<br />
<br />
* Open the IDE window.<br />
* Press Ctrl+Shift+F1 to open the help editor.<br />
* Remember the window classname. Close the window.<br />
* Use [[IDE Window: Find in files|Find In Files]] to find the source file of the class.<br />
<br />
= Object Inspector: Events: Frames: Jump to the source of an inherited event =<br />
<br />
The Object Inspector shows the events of inherited events as ''ClassName.MethodName''. Double clicking will create a new event. Ctrl+Mouse click on the combobox will jump directly to the inherited method body, without creating a new method.<br />
<br />
= Events (Method properties) in the Object Inspector =<br />
<br />
Events (Method properties) are special properties, because they need as value a code address pointer, which does not exist at design time. That's why Lazarus uses the same trick as the Delphi IDE: Every method value can be type casted to TMethod, which contains ''Data'' (the object or class pointer) and the ''Code'' (the address pointer). Normally both are not nil. The IDE sets Data to a special key value for its internal lookup table and sets Code to nil. This means:<br />
<br />
*At runtime when the program loads the .lfm file the real method (Data+Code) is used<br />
*At designtime a method value can either be a real method (Data<>nil and Code<>nil) or a fake method (Data<>nil,Code=nil)<br />
*The compiler has for Delphi compatibility some specials about comparing method values.<br />
<br />
Do not use:<br />
<Delphi><br />
if OnMyEvent<>nil then OnMyEvent(...); // wrong, because it checks Data too<br />
</Delphi><br />
<br />
Because this checks both Data and Code and will execute the fake method, resulting in a jump to nil. This will only raise an exception, so it does not do much harm, but the IDE will show the user an error dialog. Use instead the Assigned function:<br />
<Delphi><br />
if Assigned(OnMyEvent) then OnMyEvent(...); // correct, checking only Code<br />
</Delphi><br />
<br />
Do not use:<br />
<Delphi><br />
if OnMyEvent=NewValue then exit; // wrong, because it compares only Code<br />
</Delphi><br />
<br />
Because this only compares the Code. Use instead<br />
<Delphi><br />
if CompareMem(@FOnMyEvent,@NewValue,SizeOf(TMethod)) then exit; // correct, checking both Data and Code<br />
</Delphi></div>Kurishin