Forum: Ruby Compiling QtRuby

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9fea6e7f0cb9a8b8affd5f870458d982?d=identicon&s=25 Hector (Guest)
on 2006-03-29 15:58
I've been trying to compile Qt Ruby without success.
I've got Qt 4.1.1 installed and it tested fine. I was able to run the
demos without a problem.

When I try to compile qt4-qtruby-1.4.3 I get this:

<Abstract>
  -c -o qtrubyinit.o `test -f 'qtrubyinit.cpp' || echo
'./'`qtrubyinit.cpp; \
then mv ".deps/qtrubyinit.Tpo" ".deps/qtrubyinit.Po"; \
else rm -f ".deps/qtrubyinit.Tpo"; exit 1; \
fi
/bin/sh ../../libtool --silent --mode=link g++  -Wnon-virtual-dtor
-Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE
-Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -O2
-g -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions
-fno-check-new -fno-common   -o qtrubyinit -module
-L/usr/local/Trolltech/Qt-4.1.1/lib -L/usr/X11R6/lib   -version-info
0:0:0 -L../../smoke/qt/ -L/usr/local/lib qtrubyinit.o -lQtGui  -lz -lpng
-lz -lm -lXext -lX11  -lSM -lICE -lpthread -Wl,-R -Wl,/usr/local/lib
-L/usr/local/lib -L.  ../../smoke/qt/libsmokeqt.la
../../qtruby/rubylib/qtruby/libqtrubyinternal.la
libtool: link: warning: `-version-info' is ignored for programs
qtrubyinit.o: In function `main':
/source/qt4-qtruby-1.4.3/qtruby/bin/qtrubyinit.cpp:25: undefined
reference to `ruby_init'
/source/qt4-qtruby-1.4.3/qtruby/bin/qtrubyinit.cpp:26: undefined
reference to `ruby_script'
/source/qt4-qtruby-1.4.3/qtruby/bin/qtrubyinit.cpp:27: undefined
reference to `ruby_options'
/source/qt4-qtruby-1.4.3/qtruby/bin/qtrubyinit.cpp:28: undefined
reference to `ruby_run'
collect2: ld returned 1 exit status
make[3]: *** [qtrubyinit] Error 1
make[3]: Leaving directory `/source/qt4-qtruby-1.4.3/qtruby/bin'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/source/qt4-qtruby-1.4.3/qtruby'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/source/qt4-qtruby-1.4.3'
make: *** [all] Error 2

I know almost nothing about compiling C++ programs, does anyone know how
I can get around this problem.


Thank you.

Hector
D2af841a778472afafea4d40323090e5?d=identicon&s=25 Stephen Tashiro (tashirosgt)
on 2006-03-31 21:01
Hector wrote:
> I've been trying to compile Qt Ruby without success.
> I've got Qt 4.1.1 installed and it tested fine. I was able to run the
> demos without a problem.
>
> When I try to compile qt4-qtruby-1.4.3 I get this:
>
> <Abstract>
>   -c -o qtrubyinit.o `test -f 'qtrubyinit.cpp' || echo
> './'`qtrubyinit.cpp; \
> then mv ".deps/qtrubyinit.Tpo" ".deps/qtrubyinit.Po"; \
> else rm -f ".deps/qtrubyinit.Tpo"; exit 1; \
> fi
> /bin/sh ../../libtool --silent --mode=link g++  -Wnon-virtual-dtor
> -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE
> -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -O2
> -g -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions
> -fno-check-new -fno-common   -o qtrubyinit -module
> -L/usr/local/Trolltech/Qt-4.1.1/lib -L/usr/X11R6/lib   -version-info
> 0:0:0 -L../../smoke/qt/ -L/usr/local/lib qtrubyinit.o -lQtGui  -lz -lpng
> -lz -lm -lXext -lX11  -lSM -lICE -lpthread -Wl,-R -Wl,/usr/local/lib
> -L/usr/local/lib -L.  ../../smoke/qt/libsmokeqt.la
> ../../qtruby/rubylib/qtruby/libqtrubyinternal.la
> libtool: link: warning: `-version-info' is ignored for programs
> qtrubyinit.o: In function `main':
> /source/qt4-qtruby-1.4.3/qtruby/bin/qtrubyinit.cpp:25: undefined
> reference to `ruby_init'
> /source/qt4-qtruby-1.4.3/qtruby/bin/qtrubyinit.cpp:26: undefined
> reference to `ruby_script'
> /source/qt4-qtruby-1.4.3/qtruby/bin/qtrubyinit.cpp:27: undefined
> reference to `ruby_options'
> /source/qt4-qtruby-1.4.3/qtruby/bin/qtrubyinit.cpp:28: undefined
> reference to `ruby_run'
> collect2: ld returned 1 exit status
> make[3]: *** [qtrubyinit] Error 1
> make[3]: Leaving directory `/source/qt4-qtruby-1.4.3/qtruby/bin'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/source/qt4-qtruby-1.4.3/qtruby'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/source/qt4-qtruby-1.4.3'
> make: *** [all] Error 2
>
> I know almost nothing about compiling C++ programs, does anyone know how
> I can get around this problem.
>
>
> Thank you.
>
> Hector


A question from a non-Qt user.  Does Qt Ruby try to match version
numbers with Qt.  For example is qt-qtruby-1.4.3 meant to be used with
any qt-1.4.x ?

Was your compilation from a *.tar.gz file? or did it come from
installing a *.gem file?
This topic is locked and can not be replied to.