[Kde-bindings] Re: Notes on building on Mac OS X

Ben Skelton ben.skelton at chestnut-tree-cafe.org
Wed Mar 2 05:46:15 UTC 2011


Thanks Arno, I've done a clean build of smokeqt and it builds fine. 


In building qtruby I ran into a few problems:

1.  libqtruby4shared.dylib, rubyqtwebkit, qtscript, qttest, rubyphonon, rubyqwt, qtruby4

needed to apply -DHAVE_STRUCT_TIMESPEC -DHAVE_STRUCT_TIMEZONE pretty much everywhere

2. QDeclarative module

cmake did not include the libQtDeclarative.dylib in the call to the linker. All the smokeqt libraries were there, but the make complained that it could not find qdeclarative symbols.


Once those are done qtruby builds!

qtruby is installed on my machine at /Users/benskelton/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/. There are two files in that directory 'Qt.rb' and 'Qt4.rb'. Both of these are require calls to the real qtruby.rb. This is installed on my machine in /Users/benskelton/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/Qt. I needed to change both Qt.rb and Qt4.rb from

> require 'qtruby4'

to

> require 'Qt/qtruby4'

then in irb...

> Kauri:~ benskelton$ irb
> ruby-1.9.2-p136 :001 > require 'Qt4'
>  => true 
> ruby-1.9.2-p136 :002 > app = Qt::Application.new(ARGV)
>  => #<Qt::Application:0x000001008a4110> 
> ruby-1.9.2-p136 :003 > hello = Qt::PushButton.new('Hello World!')
>  => #<Qt::PushButton:0x00000100874168> 
> ruby-1.9.2-p136 :004 > hello.resize(100, 30)
> NoMethodError: undefined method `resize' for #<Qt::PushButton:0x00000100874168>
> 	from (irb):4
> 	from /Users/benskelton/.rvm/rubies/ruby-1.9.2-p136/bin/irb:16:in `<main>'

which looks like something is wrong, then...

> ruby-1.9.2-p136 :005 > hello.methods
> NoMethodError: undefined method `idInstance' for Qt::Internal:Module
> 	from /Users/benskelton/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/Qt/qtruby4.rb:239:in `qt_methods'
> 	from /Users/benskelton/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/Qt/qtruby4.rb:216:in `methods'
> 	from (irb):5
> 	from /Users/benskelton/.rvm/rubies/ruby-1.9.2-p136/bin/irb:16:in `<main>'

where I was hoping to see a whole bunch of methods that the hello object responds to.

Any ideas?

cheers,
--Ben



On 1 Mar 2011, at 22:31, Arno Rehn wrote:

> Great, I've pushed the fixes to the repo. It should build without any problems 
> now.
> 
> On Monday 28 February 2011 09:37:34 Ben Skelton wrote:
>> Hi Arno,
>> 
>> I needed to make the same change to the below:
>>> qtsvg
>>> qtsql
>>> qtopengl
>>> qtmultimedia
>>> qt3support
>>> qthelp
>>> qwt
>> 
>> In qwt/qwt_includes.h I needed to comment out
>> 
>>> #include <qwt_plot_svgitem.h>
>> 
>> That header file is strange. It is a part of the qwt source distribution I
>> have, but it does not get installed, no other header file in qwt seems to
>> include it and the class it defines does not seem to get packaged into the
>> library. Anyway, commenting it out builds smokeqt! On to rubyqt...
> What version of Qwt is that? On linux, it's installed and works just fine.
> I've wrapped the #include in an #ifndef Q_WS_MAC for now, so it shouldn't 
> cause any problems on OS X.
> 
>> cheers,
>> --Ben
>> 
>> On 20 Feb 2011, at 21:47, Arno Rehn wrote:
>>> On Sunday 20 February 2011 07:48:55 Ben Skelton wrote:
>>>> Hi Arno,
>>>> 
>>>> thanks for that.
>>>> 
>>>> The annoying "qt_mac_set_cursor" has reared its ugly head again in
>>>> libsmokeqtdeclarative.dylib
>>>> 
>>>> Undefined symbols:
>>>> 
>>>> "qt_mac_set_cursor(QCursor const*, QPoint const&)", referenced from:
>>>>    __smokeqtdeclarative::x_QGlobalSpace::x_475(Smoke::StackItem*)
>>>> 
>>>> in x_1.cpp.o ld: symbol(s) not found
>>>> collect2: ld returned 1 exit status
>>> 
>>> Fixed.
>> 
>> _______________________________________________
>> Kde-bindings mailing list
>> Kde-bindings at kde.org
>> https://mail.kde.org/mailman/listinfo/kde-bindings
> 
> -- 
> Arno Rehn
> arno at arnorehn.de




More information about the Kde-bindings mailing list