Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2009-10

How to set LCL widgetset for my project?

9 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

章宏九

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.

------
Zhang, Hongjiu

Alexander Grau
to 章宏九
Show quoted text 9 lines
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

章宏九
to Alexander Grau

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 :

Show quoted text 28 lines
章宏九 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
Graeme Geldenhuys
to Alexander Grau: I have not done this myself for Qt (but for Carbon), but this might work: Compiling…

2009/10/27 Alexander Grau :

Compiling Lazarus QT LCL: | make clean lcl LCL_PLATFORM=qt

That will only work if you are compiling the LCL itself or the Lazarus IDE. That will NOT work if you are compiling your own application. First off, you own application normally doesn't have a Makefile setup.

It's much easier to simply use the IDE. If you don't, you will have to setup a few paths via compiler parameters. The amount of paths can easily escalate to quite a few, depending on howmany packages you use.

What you can do, is load you project in Lazarus IDE, then go to Project > Compiler Settings and click the Show Options button. This will show you the full compiler string (parameters) to be able to compile your program without the IDE.

You might be able to use lazbuild as well - though I have no clue how that program works.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/
Alexander Grau
to 章宏九: Thank you. I will try, but I do not understand it. You mean in fact LCL is compiled when…

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:
章宏九
to Mattias Gaertner

Thank you for all your detailed answers. I read information about lazbuild, but I think using Lazarus is much more easier. Since I am used to vim, it might cost me some time to get familiar with it.

Thanks again.

2009/10/27 Mattias Gaertner :

Show quoted text 16 lines
On Tue, 27 Oct 2009 09:55:03 +0200 Graeme Geldenhuys wrote: >[...] > You might be able to use lazbuild as well - though I have no clue how > that program works. Gladfully the wiki knows: http://wiki.lazarus.freepascal.org/lazbuild Mattias _______________________________________________ fpc-pascal maillist  -   http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Mattias Gaertner
to 章宏九
Thank you for all your detailed answers. I read information about lazbuild, but I think using Lazarus is much more easier. Since I am used to vim, it might cost me some time to get familiar with it.

Maybe if you ask Martin in the right way he will implement vi like modes for synedit (the source editor control used by lazarus).

Mattias

Henry Vermaak
to Mattias Gaertner

2009/10/29 Mattias Gaertner :

Show quoted text 9 lines
On Thu, 29 Oct 2009 22:28:39 +0800 章宏九 wrote: > Thank you for all your detailed answers. I read information about > lazbuild, but I think using Lazarus is much more easier. Since I am > used to vim, it might cost me some time to get familiar with it. Maybe if you ask Martin in the right way he will implement vi like modes for synedit (the source editor control used by lazarus).

Now that would be very nice, but I'd imagine it's not trivial. Maybe a candidate for a bounty?