Results 1 to 9 of 9

Thread: EXE File problem

  1. #1
    Join Date
    Jan 2008
    Posts
    33
    Thanks
    1
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default EXE File problem

    I am using a window xp/2000 os in my qt4.
    here's my problem:
    i did build an .exe file, and yes it was running... however after i trasfered it in a computer that has no QT in it, it requires some .dll file like Qcore4.dll, Gui4.dll etc.. Isn't it that when you build an exe file it must include these files already so that the exe file will run even if thers no .dll file included... after i copy these .dll file my exe file runs.... however my connection to the database fails...

    im using the "QODBC" as a databasename in my codes. It was running if i have a QT in my computer but if i dont i cant connect to the database...

    or is their a guide in correct deployment of a program?

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: EXE File problem

    you need Qt libs on the PC you are deploying your application - or - you can link your application statically.
    You also need the ODBC Qt driver in your case.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jan 2008
    Posts
    33
    Thanks
    1
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: EXE File problem

    y is it that i need to copy all this file??
    can i just #include it in my program so that when my program build an exe file it will no longer require some dll files? or is it possible?

    wat lib should i include so that my connection to the database work?

    or can i just change my connection to the database like:

    QSqldatabase db= QSqldatabase::AddDatabaseName("QODBC"); but when i use this it doesnt work if the computer has no QT installed, even if i have an MySQL ODBC 3.51 driver installed... what should i do??

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: EXE File problem

    please READ carefully my answer.
    I answered all your questions.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #5
    Join Date
    Jan 2008
    Posts
    33
    Thanks
    1
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: EXE File problem

    by the way thanks for the links however i dunno where to run or execute this code..

    im using a QDevelop for my codes and QDesiner for my interface using Windows XP os...

  6. #6
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: EXE File problem

    by the way thanks for the links however i dunno where to run or execute this code..
    What code?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  7. #7
    Join Date
    Jan 2008
    Posts
    33
    Thanks
    1
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: EXE File problem

    oh that sorry mis read the txt.. thanks for the help..

  8. #8
    Join Date
    Jan 2008
    Posts
    33
    Thanks
    1
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: EXE File problem

    hi all,

    still i have the same problem even if i follow this several steps

    configure -static-release-no-exceptions (i dunno if this is the right code)

    then

    mingw32-make sub-src

    yeah it works! it no logger requires the .dlls to run but still, i cant connect to database....

    i need to do this several steps first:

    copy:
    QTCore4.dll
    QTSql4.dll

    plus

    qsqlodbc4.dll with the "path" (included all the folders where it was)
    if i only copy the .dll file w/out the path it will not work...

    y is it like that?

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: EXE File problem

    {thread continues here: odbc/connection problem}

Similar Threads

  1. Set up the Qt4.3.2 with Visual Studio 2005
    By lamoda in forum Installation and Deployment
    Replies: 6
    Last Post: 30th January 2008, 06:51
  2. Debug problem in Eclipse with qrc file
    By Vortex in forum General Programming
    Replies: 6
    Last Post: 27th December 2007, 00:56
  3. qt-3.3.8 fail in scratchbox
    By nass in forum Installation and Deployment
    Replies: 0
    Last Post: 25th May 2007, 15:21
  4. Problem with reading a file
    By Buhmann in forum Qt Programming
    Replies: 11
    Last Post: 17th February 2006, 13:02
  5. QProcess problem with windows batch file
    By bood in forum Qt Programming
    Replies: 11
    Last Post: 6th January 2006, 08:08

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.