Results 1 to 7 of 7

Thread: Compiling 4.7 code on 4.2

  1. #1
    Join Date
    May 2008
    Location
    Rijeka, Croatia
    Posts
    85
    Thanks
    10
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Compiling 4.7 code on 4.2

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Compiling 4.7 code on 4.2

    HI,

    Where are qt include files anyway?
    try with the command

    Qt Code:
    1. $ rpm -ql | grep qwidget.h
    To copy to clipboard, switch view to plain text mode 

    Also, probably first thing to ask, can code for 4.7 even run on 4.2?
    It depends if you used new API.
    A camel can go 14 days without drink,
    I can't!!!

  3. #3
    Join Date
    May 2008
    Location
    Rijeka, Croatia
    Posts
    85
    Thanks
    10
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Compiling 4.7 code on 4.2

    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?

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Compiling 4.7 code on 4.2

    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.

  5. #5
    Join Date
    May 2008
    Location
    Rijeka, Croatia
    Posts
    85
    Thanks
    10
    Thanked 6 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Compiling 4.7 code on 4.2

    Quote Originally Posted by ChrisW67 View Post
    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

  6. #6
    Join Date
    Jan 2009
    Location
    Germany
    Posts
    131
    Thanks
    11
    Thanked 16 Times in 16 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Compiling 4.7 code on 4.2

    take a look into the headers without an .h There the .h headers should be referenced

  7. #7
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Compiling 4.7 code on 4.2

    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.

Similar Threads

  1. Replies: 2
    Last Post: 9th January 2016, 10:38
  2. Problem compiling Qt 4.7.0 code with d3d10.h
    By pogo11 in forum Qt Programming
    Replies: 2
    Last Post: 12th October 2010, 22:20
  3. Replies: 0
    Last Post: 27th August 2010, 09:36
  4. Compiling QT4 Code using cmake 2.6
    By Serenity in forum Qt Programming
    Replies: 1
    Last Post: 9th November 2008, 19:04
  5. Pasting code from code tag in emacs
    By Gopala Krishna in forum General Discussion
    Replies: 0
    Last Post: 16th February 2007, 05:47

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.