Recent

Author Topic: Building Lazarus with qt  (Read 14762 times)

bkv

  • New member
  • *
  • Posts: 8
Building Lazarus with qt
« on: December 10, 2006, 10:13:09 pm »
Hi
I follwed the instuctions in the wiki, but I still get the error message : make[2]: *** [../../units/i386-linux/qt] Error 1

I know this has bee discussed in the forums already, but I did not find a solution. Please help.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
RE: Building Lazarus with qt
« Reply #1 on: December 10, 2006, 10:59:25 pm »
Which operating system are you using? Which Lazarus and FPC versions?

How are you compiling Qt? Using the IDE or the makefiles on the command line?

Aren´t there any other error messages?

My guess is that either Qt 4 libraries or libqt4intf pascal bindings to Qt aren´t correctly installed, or aren´t on your PATH (if you are on Windows). Did you install them correctly?

bkv

  • New member
  • *
  • Posts: 8
Re: RE: Building Lazarus with qt
« Reply #2 on: December 10, 2006, 11:11:38 pm »
Quote from: "sekel"
Which operating system are you using? Which Lazarus and FPC versions?

How are you compiling Qt? Using the IDE or the makefiles on the command line?

Aren´t there any other error messages?

My guess is that either Qt 4 libraries or libqt4intf pascal bindings to Qt aren´t correctly installed, or aren´t on your PATH (if you are on Windows). Did you install them correctly?




Hi. I run Kubuntu Dapper. The package manager shows  the following packages installed: libqt4-core, libqt4-gui, libqt4-qt3support, libqt4-sql.  I also found a /usr/lib/libqt4intf.so on my system

I tried to rebuild from the IDE, and there were no other error messages.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
RE: Re: RE: Building Lazarus with qt
« Reply #3 on: December 10, 2006, 11:52:39 pm »
Ok, now how did you install Lazarus? I think that the problem may be that you installed lazarus DEB package, and that only gives permissions for root to access lazarus directory, so it cannot create the Qt object files.

Can you try running Lazarus as Root to recompile it? Recompile only LCL. After that you can close Lazarus and restart lazarus as user to build your projects.

bkv

  • New member
  • *
  • Posts: 8
Re: RE: Re: RE: Building Lazarus with qt
« Reply #4 on: December 11, 2006, 12:33:55 am »
Quote from: "sekel"
Ok, now how did you install Lazarus? I think that the problem may be that you installed lazarus DEB package, and that only gives permissions for root to access lazarus directory, so it cannot create the Qt object files.

Can you try running Lazarus as Root to recompile it? Recompile only LCL. After that you can close Lazarus and restart lazarus as user to build your projects.


Thanks.
Well, seems like it was built again. But when I start lazarus I get the message in a window: "Invalid floating point operation. press ok to..."
Then next: "Access violation. press OK to....". Then it crashes.

Seems like I must re-install. I have lazarus 0.9.20 beta and fpc 2.0.4

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
RE: Re: RE: Re: RE: Building Lazarus with qt
« Reply #5 on: December 11, 2006, 02:19:35 am »
To use the Qt interface, I recomend using Subversion Lazarus. Svn Lazarus is quite stable, and there are many qt bug fixes on subversion. You can use your already working instalation of FPC 2.0.4

Plus, since svn install is usually done on home dir, you don´t have to worry about permissions. There are instructions on the wiki:

http://wiki.lazarus.freepascal.org/Getting_Lazarus

Compiling lazarus is simple as doing: make clean all

bkv

  • New member
  • *
  • Posts: 8
Re: RE: Re: RE: Re: RE: Building Lazarus with qt
« Reply #6 on: December 11, 2006, 10:22:19 pm »
Quote from: "sekel"
To use the Qt interface, I recomend using Subversion Lazarus. Svn Lazarus is quite stable, and there are many qt bug fixes on subversion. You can use your already working instalation of FPC 2.0.4

Plus, since svn install is usually done on home dir, you don´t have to worry about permissions. There are instructions on the wiki:

http://wiki.lazarus.freepascal.org/Getting_Lazarus

Compiling lazarus is simple as doing: make clean all


Great! it worked very well. I just had to download th fpc sources again as they disappeard when I deinstalled the Lazarus deb package. It was very easy to get Lazarus from svn and compile it on my system. In general, though, I do prefere deb-packages when I install software, because it is easier to keep the system clean with these.

I have been programming with Delphi (3-4-5-7) for some years, but my job is now switching to C# and Visual Studio. Very good that someone makes Lazarus and fpc as multiplatform products.

I came to think of one more thing: Is it possible to also build the IDE with qt?

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
RE: Re: RE: Re: RE: Re: RE: Building Lazarus with qt
« Reply #7 on: December 12, 2006, 11:08:43 am »
I think compilation may succeed, but that the qt interface is not mature enough to create a workable executable.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: RE: Re: RE: Re: RE: Building Lazarus with qt
« Reply #8 on: December 12, 2006, 11:25:40 am »
Quote from: "bkv"
In general, though, I do prefere deb-packages when I install software, because it is easier to keep the system clean with these.


Lazarus doesn´t require any install procedures, so it will only have files on it´s svn directory, keeping the system clean.

Quote
I came to think of one more thing: Is it possible to also build the IDE with qt?


No, not yet.

If you want a better looking IDE, you could try Gtk 2 IDE. It has some minor bugs compared to Gtk 1 IDE, however.

bkv

  • New member
  • *
  • Posts: 8
Building Lazarus with qt
« Reply #9 on: December 12, 2006, 09:43:50 pm »
Is there a way to verify that the LCL really got rebuild with qt?
I am  comparing a window I made with Lazarus to a qt3-app I made witht he ruby language and the qt designer, and they look different. The ruby app's buttons, for example, have rounded corners, while the Lazarus-app's do not.

(Just wonders, I like Lazarus anyway).

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Building Lazarus with qt
« Reply #10 on: December 12, 2006, 09:48:18 pm »
Rename every directory in lcl\units\i386-linux except the qt directory and recompile you app.

If it succeeds, you know the compiled units from the qt directory are used.

bkv

  • New member
  • *
  • Posts: 8
Building Lazarus with qt
« Reply #11 on: December 12, 2006, 09:59:08 pm »
Quote from: "Vincent"
Rename every directory in lcl\units\i386-linux except the qt directory and recompile you app.

If it succeeds, you know the compiled units from the qt directory are used.


It did not succced. I get the message: /tmp/project1.lpr(8,7) Fatal: Can't find unit Interfaces. It still uses gtk. Hm.. strange.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Building Lazarus with qt
« Reply #12 on: December 12, 2006, 10:02:06 pm »
Did you change the widgetset in the compiler options of your project?

bkv

  • New member
  • *
  • Posts: 8
Building Lazarus with qt
« Reply #13 on: December 12, 2006, 10:06:37 pm »
Quote from: "Vincent"
Did you change the widgetset in the compiler options of your project?

No I hadn't. I did now, and this time it really looks like a qt app. Thanks.

As far as I understood the wiki, the full functionality of the LCL is only available with gtk. Is that so?

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Building Lazarus with qt
« Reply #14 on: December 12, 2006, 10:16:00 pm »
In order of maturity (highly subjective): gtk1 -> win32 (on windows) -> gtk2 -> wince (on arm-wince) -> carbon -> qt.

See also http://wiki.lazarus.freepascal.org/Roadmap

 

TinyPortal © 2005-2018