Trying to compile to Qt, Linux lazarus / 1-Linux ---------------------------------------------------------------------- windy · 2007-10-20 03:50 Hi I have the latest snapshot in use. And I have downloaded the Qt binary .so file and put that in the /usr/lib/ folder but when I set to build the LCL , I get an error, about i386-linux/qt what should I have set for the options? what am I missing? also, is it possible to use the carbon widget set on linux (which I have in use on my mac, looks much better than gtk! ( i get a similar error when trying to compile to carbon under linux) as I really dont want to have to purchase QT, too much $ thanks! Brian update: made some progress by running lazarus with xwindows running as root so now the directories could be created now, for compiling the LCL as carbon, i get error about cant find unit FPCMacOSAll used by Carbonint I can now compile the LCL for Qt but when I try to set the compiler to Qt, I get error about linking (and lots of errors referencing QT with the qt4 .so file ---------------------------------------------------------------------- Almindor · 2007-10-20 09:48 make sure you got also the libqt4intf.so file and put it in your library path (eg: /usr/local/lib) AND did a "ldconfig" afterwards too. ---------------------------------------------------------------------- windy · 2007-10-20 11:11 Hi ok, i copied to /usr/local/lib too and did a ldconfig as well I still see undefined reference messages (e.g QTransform::translate(double,double) and then at the end of that string of messages, error while linking.... so close but no cigar as they say! maybe I downloaded the wrong .so file? i downloaded the x11 one...thats for linux, yes? ---------------------------------------------------------------------- windy · 2007-10-20 11:51 humm, i got it to compile by putting in -framework /usr/local/lib/libqt4intf.so -shared  and tick pass options to the linker but when I run a simple program that has been compiled i get a segmentation fault.... do i need to create an application bundle for it? ---------------------------------------------------------------------- zeljko · 2007-10-20 12:22 ok, you did something wrong, so I'll elaborate a bit here. 1.What qt version you have installed on your linux machine ? I'll assume that's 4.3.XX so libQtXXX should be in /usr/lib 2.Download bindings from http://users.pandora.be/Jan.Van.hijfte/qtforfpc/fpcqt4.html BE CAREFUL THERE'S FEW VERSIONS ! If U have Qt-4.3.XXX then download 4.3.1 -> X11 (V1.53) -> bin-qt43 XXXXX.tar.gz unpack it and copy libqt4intf.so into /usr/lib 3.Download latest svn or daily snapshot. 4.Now you can compile it and use it. ---------------------------------------------------------------------- zeljko · 2007-10-20 12:25 Quote from: "windy"humm, i got it to compile by putting in -framework /usr/local/lib/libqt4intf.so -shared  and tick pass options to the linker but when I run a simple program that has been compiled i get a segmentation fault.... do i need to create an application bundle for it? No, -framework & bundles are just if U need qt on macosx. go here and look for Mac hints if U need it, but also other things about qt interface. http://wiki.lazarus.freepascal.org/index.php/Qt_Interface ---------------------------------------------------------------------- windy · 2007-10-20 18:28 Hi thanks for the help so far I have done all of the above, and read that page lots of time what about geting carbon to work on linux and the missing FPCMacOSAll? ---------------------------------------------------------------------- zeljko · 2007-10-20 19:32 Ok, send some compiling errors here. I've got "the case" two days ago (also problem with compiling qt interface), he told me that he have latest bindings etc ... but the point was that in /usr/lib was libqt4intf.so smaller for about 100k then current release , so I think that he's got 1.50. Old bindings causes problems ! Latest qt43.pas & latest bindings guarantee success. ---------------------------------------------------------------------- windy · 2007-10-20 19:59 the file details are: 1,7mb for the .so file, 10/06/07 06:08am and same date for the .pas file (923.0kb) do I have the latest update? ---------------------------------------------------------------------- windy · 2007-10-20 20:15 i have done a search of the files the ones in the lazarus directory, in the qt folder, are older! standby! ---------------------------------------------------------------------- windy · 2007-10-20 20:22 dang! and I thought that was the solution! i recompiled the LCL with that new libqt4.pas in the usr/lib/lazarus/lcl/interaces/qt which was OK, and then tried to compile a simple program set to qt widget, but still the same errrs about /usr/local/lib/libqt4int.so:undefined reference to: Q  etc and then finally project1.lpr(17,1) Error: Error while linking (which was fatal) ---------------------------------------------------------------------- windy · 2007-10-20 20:44 if I do a test under the compiler options, I get all tests succeeded... maybe I dont have the latest snaphot? it notice its still 2.2 and not 2.2.1 for the FPC? I did download it on the 20th Oct from the daily snapshots web site, for linux i-386... (and that is confirmed under help, about, 0.23 beta, 20/10/2007, svn revision) ---------------------------------------------------------------------- windy · 2007-10-21 03:23 good I used the FPCMacOSAll.pas file from the windows version of Lazarus and so its not complaining about missing that file... but that file must be a bit older, still an error....so I will look to download the latest windows version of lazarus ---------------------------------------------------------------------- windy · 2007-10-21 04:14 hummm now I get an error with incompatible type for arg  in th ecarbonlists.pp file maybe I should try a new lazarus snap shot download for linux? ---------------------------------------------------------------------- windy · 2007-10-21 05:43 i seem to have stuffed things up...I cant even compile to the default gtk now....cannot find /usr/lib/libpthread_nonshared.a is it possible to compile to linux from my mac intel pc lazarus version, and if so, how? thanks! (as setting the target os to linux and the target cpu to i386 i get an error, the system.ppu was not found in the FPC directories, etc or maybe I compile from windows to linux (I see there is a help on that in the wiki), as the windows version can be set to use qt OK (but wait, missing qt4 dll file) i see this info for compiling to linux from windows: http://www.stack.nl/~marcov/crossnotes.txt too difficult, instead I will try to get lazarus sorted out (even a re install of linux) ---------------------------------------------------------------------- Phil · 2007-10-21 15:30 Quote from: "windy"hummm now I get an error with incompatible type for arg  in th ecarbonlists.pp file maybe I should try a new lazarus snap shot download for linux? These things are specific to Mac OS X and are meaningless for other platforms and OS's: -Carbon -FPCMacOSAll.pas -frameworks -app bundle Thanks. -Phil ---------------------------------------------------------------------- windy · 2007-10-21 18:05 Hi ah,OK that clears that up (but I had read in the announcements about carbon working for linux?) was worth a try anyway! So I will go down the Qt path.... ---------------------------------------------------------------------- Paul Ishenin · 2007-10-22 01:16 carbon is the framework of Mac OSX (same as win API is the framework of Windows)