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.
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.
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.
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