Results 1 to 16 of 16

Thread: how to run Qt programs on non qt machine ?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2007
    Location
    Augsburg, Germany
    Posts
    75
    Thanks
    4
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how to run Qt programs on non qt machine ?

    The gif extension for Qt is not being compiled by default. To enable it you have to add "--qt-gif" to your configure commandline.

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to run Qt programs on non qt machine ?

    how do i do that ?? can u explain ?
    thx

  3. #3
    Join Date
    Jan 2007
    Location
    Augsburg, Germany
    Posts
    75
    Thanks
    4
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how to run Qt programs on non qt machine ?

    How did you compile your Qt version if you don't know how to configure it?

    With gcc:
    Qt Code:
    1. $QTDIR/configure.exe --qt-gif
    2. make
    To copy to clipboard, switch view to plain text mode 

    With Visual Studio (OpenSource version with QtWin patch)
    Qt Code:
    1. qconfigure.bat <compiler> --qt-gif
    2. nmake
    To copy to clipboard, switch view to plain text mode 
    Last edited by gri; 24th January 2007 at 11:31. Reason: updated contents

  4. #4
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to run Qt programs on non qt machine ?

    ya i had compiled my Qt with the QtWin patch from here.

    with the parameter qconfigure.bat msvc2005
    and i had read that by default static version are built...

    will i have to rebuild Qt with static option to enable importing the plugins ??
    Note : On my machine I have no problem running the program, its when I have to run the program on my friends machine, I get the plugin problem

    I feel like a kid when it comes to makefiles and static/dynamic builds... i nver bothered to dig deep in it, just use the IDE's. Is there any link to know how to build dynamic/static programs, what are the various options, etc ??

    And what option should i keep for jpg and bmp formats ??

    Thx for ur help... and hope u can give some more time to me

  5. #5
    Join Date
    Jan 2007
    Location
    Augsburg, Germany
    Posts
    75
    Thanks
    4
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how to run Qt programs on non qt machine ?

    You have to rebuild the libraries. If you want to use a static Qt version, you'll have to type "qconfigure.bat msvc2005 --qt-gif -static". Otherwise without "-static" (maybe "--static").

    If your program links on your computer but no images can be shown on your friends machine you probably forgot to deliver the "plugins/imageformats" dlls to him. You should read Deploying Qt Applications for that.

    If it does not load the imageformats like you want you have to call "QCoreApplication::addLibraryPath()" and set the path where the imageformats are.

  6. #6
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to run Qt programs on non qt machine ?

    is ther a way to check if my build is a static one or not ?? and what image formats are supported ?
    and also does it have the plugins required ??

    in here it is written that
    Take note of any options that you are interested in. Note that by default, static and debug versions of the library are built - this is usually the appropriate choice for most developers.
    rebuilding Qt takes a lot of time... so wanna avoid it..

    I will try the solutions u gave...i guess i have problem with deploying, bec on my machine, when i run the program, i am able to load the images and edit them..

    Thx again

  7. #7
    Join Date
    Jan 2007
    Location
    Augsburg, Germany
    Posts
    75
    Thanks
    4
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how to run Qt programs on non qt machine ?

    Quote Originally Posted by aamer4yu View Post
    is ther a way to check if my build is a static one or not ?? and what image formats are supported ?
    and also does it have the plugins required ??
    You can check that. If you have a QtCore4.dll in $QTDIR/bin it seems to be a dynamic linked version. The supported imageformats depend on which one you have built. The normal Qt distribution supports JPEG, PNG, SVG and GIF (reading, which is disabled by default).

    Yes, rebuilding takes a little bit of your time. But you don't do that every day so take the time and configure your environment like you need it. Compiling whole Qt takes about 40 minutes to one hour on my computer.

  8. #8
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to run Qt programs on non qt machine ?

    thanks...

    is there some boook or site from where I can learn these building things ?? till now I have been using IDE's and not much bothereed whats going on at the back...

    it wud be nice if I get some link to read from.. all this static/dynamic building, deploying... understanding how .lib and .dll work... how to use .lib , .dll with static and dynamic build..etc...
    thx

  9. #9
    Join Date
    Jan 2007
    Location
    Augsburg, Germany
    Posts
    75
    Thanks
    4
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: how to run Qt programs on non qt machine ?

    I don't know a book, maybe someone else ...

    For me Qt's .pro files are self-explanatory and if I miss something, qmake's documentation (also available in the assistant) helps.
    Building itself is like on every make based system, not much commands. "make --help" could help you. Also "qconfigure --help" may help you to see with which options you could build Qt.

  10. #10
    Join Date
    Jul 2012
    Posts
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: how to run Qt programs on non qt machine ?

    Hi everyone,

    I am a new Qt programmer
    I have a Qt application, I build and run on my machine (Qt installed) is OK, but I copy it to other machine non installed Qt, it do not run.
    I need to know this method very much. Can anyone help me?

    Thanks.
    nguahoang

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: how to run Qt programs on non qt machine ?

    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 5
    Last Post: 28th August 2006, 14:36
  2. Can't compile programs in Visual Studio.net 2005
    By xgoan in forum Qt Programming
    Replies: 3
    Last Post: 7th July 2006, 14:10
  3. linking user space and kernel space programs with qmake
    By zielchri in forum Qt Programming
    Replies: 9
    Last Post: 8th March 2006, 23:11

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.