Results 1 to 19 of 19

Thread: Run my program on a different computer?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    skizzik Guest

    Default Run my program on a different computer?

    I have created a program in Qt Creator on a mac and now I need to run it on a different computer, which don't have Qt on it. How can I rebuild the program so it can be used on any mac computer?

    A related problem: When I run the program from inside Qt Creator, it works fine. But if i try to start it from the app file on the computer it doesn't work, problems loading a dylib file. I had the same problem from inside Qt before but solved it by specify the permanent directory where the file was located in the running settings in Qt Creator. How can i fix this?

  2. #2
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Thanks
    1
    Thanked 29 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Run my program on a different computer?

    In order for the application to run on another computer you need to deploy Qt libraries on it. On the other hand you can link your application against static Qt libs, so there will be no need to deploy Qt to the computer where you are going to run your application (but this increases the size of your binary).

    As for your issue with running and application outside Qt Creator, then the reason why that happens is that Qt Creator know where the libs are, but the environment you are running your application in doesn't. So, try to add the paths to Qt libs to LD_LIBRARY_PATH environment variable.
    Last edited by lyuts; 29th October 2010 at 12:16. Reason: updated contents
    I'm a rebel in the S.D.G.

  3. #3
    skizzik Guest

    Default Re: Run my program on a different computer?

    1) How do I know which Qt libraries I have to deploy? But I think the second variant is probably better in this case (don't know yet, and wanna learn both ways for the future) but how do I link it against static Qt libs? Do I have to reinstall Qt itself?

    2) I have set "DYLD_LIBRARY_PATH" to "/opt/local/lib" under Run Settings -> Run Environments and that works when started from Qt. Adding "LD_LIBRARY_PATH" gives the same result.

  4. #4
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Thanks
    1
    Thanked 29 Times in 27 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Run my program on a different computer?

    Quote Originally Posted by skizzik View Post
    1) How do I know which Qt libraries I have to deploy? But I think the second variant is probably better in this case (don't know yet, and wanna learn both ways for the future) but how do I link it against static Qt libs? Do I have to reinstall Qt itself?

    2) I have set "DYLD_LIBRARY_PATH" to "/opt/local/lib" under Run Settings -> Run Environments and that works when started from Qt. Adding "LD_LIBRARY_PATH" gives the same result.
    1) On Unix/Linux usually ldd is used. As for MacOS then Google says it is otool.
    2) Google suggests man dyld.

    I'm not being rude, I don't any experience with MacOS and didn't notice that you were using it in your original post.
    Last edited by lyuts; 29th October 2010 at 14:11. Reason: updated contents
    I'm a rebel in the S.D.G.

Similar Threads

  1. QtCored4.dll is missing from your computer
    By dmateer in forum Newbie
    Replies: 1
    Last Post: 7th May 2010, 20:18
  2. Turn off computer
    By swiety in forum KDE Forum
    Replies: 1
    Last Post: 5th January 2008, 15:40
  3. Replies: 4
    Last Post: 14th June 2007, 05:06
  4. Cell Computer Project
    By genetechnics in forum General Discussion
    Replies: 13
    Last Post: 6th August 2006, 15:38

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
  •  
Qt is a trademark of The Qt Company.