Sorry, my answer was only half of the truth. To use this compiled LCL in your project via command line, you have to specify it to the compiler (e.g. -dLCLqt), as well as other required paramters. Below you can see two examples of one project we compile via command line, both on OS X and on Windows.
As Graeme suggested in his poisting, the easiest to find all required parameters is to make a new project in Lazarus and look for the command line parameters in the compiler options dialog.
Regards,
Alexander
----Mac OSX example-----
LAZPATH=../../lazarus/lazarus
echo "--------------- i386 ---------------------- " fpc -MObjFPC -Sgi -O1 -gl -XX -k-framework -kCarbon -k-framework -kOpenGL -k'-dylib_file'
-k'/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib' -WG -vn-w- -l -Fu$LAZPATH/lcl/units/i386-darwin/
-Fu$LAZPATH/lcl/units/i386-darwin/carbon/
-Fu$LAZPATH/packager/units/i386-darwin/ -Fusynapse/source/lib -Fu. -FUoutput/ -FEoutput/ -dLCL -dLCLcarbon -k-macosx_version_min -k10.4 -XR/Developer/SDKs/MacOSX10.4u.sdk/ -olicmani386 licman.lpr echo "--------------- PPC ---------------------- " fpc -MObjFPC -Sgi -O1 -Ppowerpc -gl -XX -k-framework -kCarbon -k-framework -kOpenGL -k'-dylib_file'
-k'/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib' -WG -vn-w- -l -Fu$LAZPATH/lcl/units/powerpc-darwin/ -Fu$LAZPATH/lcl/units/powerpc-darwin/carbon/
-Fu$LAZPATH/packager/units/powerpc-darwin/ -Fusynapse/source/lib -Fu. -FUoutput/ -FEoutput/ -dLCL -dLCLcarbon -k-macosx_version_min -k10.4 -XR/Developer/SDKs/MacOSX10.4u.sdk/ -olicmanppc licman.lpr echo "--------------- Striping off debug info ---------------------- " strip output/licmani386
strip output/licmanppc
echo "--------------- Creating Universal Binary ---------------------- " lipo -create output/licmani386 output/licmanppc -output output/licman rm output/licmani386
rm output/licmanppc
echo "Done."
----Win32 example-----
@echo off
SET FPCPATH=C:\FPC\2.2.4\bin\i386-win32
echo --------------- i386 ----------------------
%FPCPATH%\fpc -MObjFPC -Sgi -O1 -gl -XX -WG -vn-w- -l -FuC:\lazarus\lcl\units\i386-win32\
-FuC:\lazarus\lcl\units\i386-win32\win32\
-FuC:\lazarus\packager\units\i386-win32\ -Fusynapse\source\lib -Fu. -FUoutput\ -ooutput\licman.exe -dLCL -dLCLwin32 licman.lpr echo --------------- Striping off debug info ---------------------- %FPCPATH%\strip output/licman.exe
echo Done.
Show quoted text 46 lines
Thank you. I will try, but I do not understand it. You mean in fact
LCL is compiled when my project is compiled and no compiled LCL is
given in FPC and Lazarus? I guess that LCL is given in sources code
form and compiled while my program compiles.
Thank you for your answer.
---
Zhang, Hongjiu
2009/10/27 Alexander Grau :
> 章宏九 schrieb:
>
>> On the page (
http://wiki.lazarus.freepascal.org/Qt_Interface), I read
>> "To compile a project for Qt just select it as the target widgetset on
>> the Compiler Options dialog." However, I am using vim instead of
>> Lazarus IDE. How should I set the compiler options in the command
>> line? I would also like to know more about in which file is the option
>> given in the LCL sources.
>>
>> Thank you for your response.
>>
>>
> Hello,
>
> I have not done this myself for Qt (but for Carbon), but this might work:
>
> Compiling Lazarus QT LCL:
> |
> make clean lcl LCL_PLATFORM=qt
>
>
> |Regards,
> Alexander
>
> _______________________________________________
> fpc-pascal maillist -
>
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
>
_______________________________________________
fpc-pascal maillist -
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Mit freundlichen Grüßen/Best regards
Alexander Grau
Grau GbR
Hardware & Software Solutions
Eschenweg 12
32609 Huellhorst
Germany
www.grauonline.de
Tel: +49 (0) 5741 2301259
Fax: +49 (0) 5741 235530
E-Mail: