PDA

View Full Version : Compiling 4.7 code on 4.2



stefan
14th July 2011, 04:51
Hi all!

I've developed an Qt application om my laptop with Qt 4.7.3.
I need to run it on server that has CentOS 5 with Qt 4.2.1.

If I try to run binaries compiled on laptop, I get "segmentation fault".

When I tried to compile it on server, compiler cant find Qt files on #include (qt-devel is installed).
I tied most simple application, but it also have the same problem with compilation. Where are qt include files anyway? I know where they are on openSUSE, but cant find them on same path in CentOS.

Any ideas on this?

Also, probably first thing to ask, can code for 4.7 even run on 4.2? I use basic gui widgets and threading... and core stuff as QVector, QString, QObject...

Thanks for any reply

mcosta
14th July 2011, 13:52
HI,


Where are qt include files anyway?

try with the command



$ rpm -ql | grep qwidget.h



Also, probably first thing to ask, can code for 4.7 even run on 4.2?
It depends if you used new API.

stefan
14th July 2011, 20:04
I think that the problem is that i don't have QWidget file, though there is a qwidget.h (with .h). Why? How can I fix that? Is something wrong with CentOS Qt-devel packages?

ChrisW67
14th July 2011, 23:44
It is possible the server doesn't have Qt development packages (which include the headers) installed, just the run time libraries. Is the server under your control?

You could deploy your run-time libraries along with your application and launch your app with a wrapper script. See
Deploying an Application on X11 Platforms

Of course, all bets are off if you have built 64-bit on your laptop and the server is 32-bit.

stefan
15th July 2011, 00:39
It is possible the server doesn't have Qt development packages (which include the headers) installed, just the run time libraries. Is the server under your control?

You could deploy your run-time libraries along with your application and launch your app with a wrapper script. See
Deploying an Application on X11 Platforms

Of course, all bets are off if you have built 64-bit on your laptop and the server is 32-bit.

devel packages are installed and .h files are in /usr/lib64/qt4/include, but there aren't haders without .h
I dont have direct control on that machine, but i can ask admin to install packages.
both machines are 64/bit

nightghost
15th July 2011, 10:27
take a look into the headers without an .h There the .h headers should be referenced

SixDegrees
15th July 2011, 10:46
I dont have direct control on that machine, but i can ask admin to install packages.

Ask them to install a more recent version of Qt.