tags:

views:

267

answers:

3

Hi Geeks,

I downloaded the qt embedded demo source code recently on my linux machine. Following are the outcomes during running of the program

  1. I compiled it statically on my x86 machine and run the application on x86 machine it runs fine. But when i took the statically compiled binary file to other machine with Atom platform It run with some missing widgets. I found that the plugins cant be ported with static compilation. Can anybody tell me is it true? If no can anybody tell me the steps for it?
  2. I compiled it dynamically with shared libraries. Then got an executalbe on linux. I did "ldd MyAppName". It show me the shared library files it is using. But I dont know how to package these. Can anybody tell me the steps to package it?

I checked in the article on deploying qt applications on X11-linux platforms. But its not complete. Can anybody give me the detailed steps?

Any help will be appreciated......

A: 

you either have a distro, that does'nt support atom, or libraries, that are not compiled with support for it. either way - something somewhere on your system (or your qt) is not compiled for atom

fazo
I have the distro ubuntu and Its currently running on atom machine. I just need to develop the qt application, compile and link and then want to port it on the target atom machine running ubuntu linux. But I dont know how to package the application dynamically linked libraries. Could you please help me in that?
Surjya Narayana Padhi
A: 

The problem is that you are compiling your app, and its libraries (static or dynamic) work for x86, not for Atom. Perhaps you are able to create some sort of fat binary (lipo?) so that pieces of your app will function on x86 and Atom, but bits using the x86-only libraries will not function on Atom. (Right? That's a concise definition of your problem?)

If you have the source code for the libraries that don't run on Atom, and they're important to you, you should consider porting the code to Atom. If it's open-source code, you can contribute to the project. While you didn't give many details, my (very generic) approach to this would be to get the code on an Atom machine, write a very short test application for the library, and work out the issues.

Re #2: There's little difference between compiling an app and linking to shared libraries or dynamic libraries. On your x86 machine, if you have this code (these "plugins") compiled as dynamic libraries, it's pretty much the same as statically linking those binaries into the app. These libraries will work on x86, whether they're dynamically or statically linked.

I'm not sure if that helps very much -- if you're getting binary Qt plugins as static or dynamic libraries without source, you're out of luck. Submit a bug report. If you have source code, you can do a lot more.

jibberia
Actually my target machine has atom processor and I think processor is not the issue because I am able to run the statically linked executable(The Main GUI is up but only I am missing some widgets). If platform would have been issue I would not hav run at all. I just need to know how to package a dynamically linked qt application. If I know the shared libraries it consists of. Can you please tell me the steps how to package an dynamically linked QT application? I am sorry?
Surjya Narayana Padhi
So the shared libraries work on Atom? The problem with distributing a dynamically linked app is dependencies -- the target machine must have the right version of those libraries installed. This is a little bit outside my expertise, but I'd imagine you'd create an rpm or deb (or whatever) package that installs the dylibs, or at least lists them as required dependencies. You could also do a dirtier hack and include the dylibs in your distro and make an installer script. (error-prone, etc...)In your case, static linking feels right. I'm not sure how you do it, so I can't really help. More?
jibberia
A: 

I just dynamically compiled my application and ported to atom platform. I found the dependencies and ported them also and set the environment variable LD_LIBRARY_PATH on target machine to my ported shared libraries and It worked. Thanks everybody for your suggestions

Surjya Narayana Padhi