Results 1 to 4 of 4

Thread: Creating executable for linux

  1. #1
    Join Date
    Jan 2011
    Posts
    24
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Creating executable for linux

    Hi,

    I've developed a program which is working when qt is present.
    I've deployed the executable file(.pro) in another system where qt is not present, and i've copied the related library files(using 'ldd file') . When i'm running the program, it is giving 'segmentation fault'. Please give some solutions of how to create an executable.

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Creating executable for linux

    If your program starts, it means that all needed dependencies are met. Looks like this could be a problem with your code, for example hard-coded paths to files, which are not present on the target system. Try to compile debug version, run the executable with attached debugger on the target system and check the backtrace.

  3. #3
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Creating executable for linux

    First thing ".pro" is a Qt Project Configuration file not a executable file.
    If the executable runs on the development machine in release mode, and the other machine also has compatible software configuration, then its the library file which cause the error.
    Check all the modules which your software is dependent on, and include all of them (release mode) in the deployment.

  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: Creating executable for linux

    I assume you copied the executable and not the project file.

    The Qt library files (and everything they depend on) must be placed in a position so that the operating system can find them. On Linux this does not automatically include the directory containing the executable like it does on Windows. There are several ways to tackle this: they are outlined in the docs

Similar Threads

  1. Run the executable also on linux
    By g_mandel in forum Installation and Deployment
    Replies: 1
    Last Post: 26th April 2010, 13:49
  2. qt executable in linux
    By knishaq in forum Qt Programming
    Replies: 10
    Last Post: 3rd February 2010, 12:51
  3. Replies: 13
    Last Post: 10th June 2009, 01:56
  4. Can executable-name be case-in-sensitive in Linux ...??
    By joseph in forum Installation and Deployment
    Replies: 1
    Last Post: 3rd June 2008, 07:27

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.