Recent

Author Topic: Can not comple lazarus for Gtk2 in ubuntu  (Read 6904 times)

ario

  • Newbie
  • Posts: 4
Can not comple lazarus for Gtk2 in ubuntu
« on: June 18, 2009, 06:04:27 am »
Hi
I recently installed lazarus, But I'm Familiar with Borland Delphi, After all I found that lazarus uses a very ugly widgetset like in windows 98 environment. I found a wiki about using gtk2 widget set in lazarus in here http://wiki.lazarus.freepascal.org/GTK2_Interface and followed its instructions:
Code: [Select]
Quick start guide for Linux, FreeBSD, etc

The first thing to do is to install the gtk2 libraries including the development packages. For example: linux/debian systems call them libgtk2.0-dev. There are complete installers for Windows here.

Now compile the LCL for gtk2. First open your normal compiled Lazarus. Then go on the menu "Tools" --> "Configure Build Lazarus". Set LCL to "clean+build" and everything else to "None". Now select "gtk2" and click on the "Ok" button. Next go to the menu "Tools" --> "Build Lazarus". Now the LCL is compiled for gtk2 too. (Note: the default widgetset is still there and not overwritten).

To compile a project for gtk2 just select it as the target widgetset on the Compiler Options dialog.

At this moment the Lazarus IDE can be compiled for gtk2, but it is slow and it can crash on some window managers.
But after all noting happened. Lazarus is still using its old ugly widget set :-X Also I don't know how to do the last step: "select it as the target widgetset on the Compiler Options dialog" I searched all over Compiler Options window but did not find any thing about target widgetset %).
Do you know how to use gtk2 in lazarus for compiling programs? I don't want my applications to look ugly :-\.
Thanks for your attention guys ::)

ario

  • Newbie
  • Posts: 4
Re: Can not comple lazarus for Gtk2 in ubuntu
« Reply #1 on: June 18, 2009, 06:23:25 am »
I found that I must go to "Advanced Build Options" tab in Configure build Lazarus window and set all other options except LCL to none and LCD itself to Clean+Build. Then follow the wiki instructions I said before. Now Lazarus environment is still using ugly gray widgetset but I can select Gtk2 widget set in Project\Compiler options\LCL widget Type. So part of the problem still exists. How change the lazarus environment to use gtk2?
Thanks again.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: Can not comple lazarus for Gtk2 in ubuntu
« Reply #2 on: June 18, 2009, 07:45:01 am »
Tools -> Configure Build Lazarus -> Quick Build Options -> Build all and widgetset -> gtk2.

Troodon

  • Sr. Member
  • ****
  • Posts: 484
Re: Can not comple lazarus for Gtk2 in ubuntu
« Reply #3 on: June 18, 2009, 02:35:01 pm »
You must launch Lazarus/FPC with root privileges to rebuild it on Linux, try `sudo startlazarus`.
Lazarus/FPC on Linux

ario

  • Newbie
  • Posts: 4
Re: Can not comple lazarus for Gtk2 in ubuntu
« Reply #4 on: June 18, 2009, 02:35:43 pm »
Thanks Vincent. I tried as you said but IDE environment itself is still in gtk style not in gtk2 style. But I can still compile my application for gtk2 widgetset.

 

TinyPortal © 2005-2018