Results 1 to 10 of 10

Thread: Building QtSql only

  1. #1
    Join Date
    Feb 2013
    Posts
    13
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Building QtSql only

    Hi,

    While building QtSql is possible as part of building the entire Qt project, it builds many more things than just QtSql which may not be required in my case

    Is there a way to specify a minimal build for just QtSql and its dependencies?

    Also, can one create vcproj files for Visual Studio editor browsing of Qt code when building from VS2010 command prompt?

    Thanks
    lk

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

    Default Re: Building QtSql only

    You can build QtCore and QtSql (and database drivers) manually by calling make in respective subdirectories.
    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.


  3. #3
    Join Date
    Feb 2013
    Posts
    13
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Building QtSql only

    Building QtSql from directory "qtbase\src\sql" is possible after initial build of entire Qt
    However, if taking clean sources, this directory does not contain any Makefile file for building

    My test platform is Windows Visual Studio command prompt

    Ran configure using:
    "
    configure -prefix %CD%\qtbase -opensource -nomake tests -opengl desktop
    "

    But the directory 'qtbase\src\sql' contains only the following files
    "
    02/17/2013 11:26 AM <DIR> .
    02/17/2013 11:26 AM <DIR> ..
    02/17/2013 11:26 AM <DIR> doc
    02/17/2013 11:26 AM <DIR> drivers
    02/17/2013 11:26 AM <DIR> kernel
    02/17/2013 11:26 AM <DIR> models
    12/18/2012 09:03 PM 1,260 README.module
    12/18/2012 09:03 PM 384 sql.pro
    "

    Is there some specific configure command that is required for creating this makefile before build?

    [EDIT:
    Found an alternative solution:
    from directory 'qtbase\src' run:
    nmake sub-corelib
    nmake sub-sql
    ]

    Thanks
    lk
    Last edited by lk; 17th February 2013 at 13:55.

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

    Default Re: Building QtSql only

    Quote Originally Posted by lk View Post
    Building QtSql from directory "qtbase\src\sql" is possible after initial build of entire Qt
    However, if taking clean sources, this directory does not contain any Makefile file for building
    You need to configure the build first.

    Ran configure using:
    "
    configure -prefix %CD%\qtbase -opensource -nomake tests -opengl desktop
    "

    But the directory 'qtbase\src\sql' contains only the following files
    I'm sure qtbase or qtbase/src contain a Makefile. You probably need to call nmake sub-corelib sub-sql or something similar.
    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.


  5. #5
    Join Date
    Feb 2013
    Posts
    13
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Building QtSql only

    Now that I built the QtSql and QtCore, I have an additional question, which may be asked in a different thread but I thought to add it here

    The configure options show there is an option for generating vcproj files
    "
    configure --help
    .
    .
    * -vcproj ............ Generate VC++ .vcproj files, only if platform
    "win32-msvc.net".
    .
    "

    Is this option valid on the free version and creates vcproj files? I tried setting it with

    configure -prefix %CD%\qtbase -opensource -nomake tests -opengl desktop -platform win32-msvc.net
    and got an error
    "
    Invalid option "win32-msvc.net" for -platform.
    "

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

    Default Re: Building QtSql only

    Should be win32-msvc2010.
    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.


  7. #7
    Join Date
    Feb 2013
    Posts
    13
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Building QtSql only

    Tried configuring with win32-msvc2010 and building, and still no visual studio project was created, here is a list of commands:
    "
    set QMAKESPEC=win32-msvc2010
    configure -prefix %CD%\qtbase -opensource -nomake tests -opengl desktop -platform win32-msvc2010 -vcproj
    cd qtbase\src
    nmake sub-corelib sub-sql
    "

    However, I did manage to create a visual studio project using the following command:
    From the "qtbase\src\sql" path
    "
    ..\..\bin\qmake.exe -tp vc -r -spec win32-msvc2010 sql.pro
    "

    This created a "Qt5Sql.vcxproj" file

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

    Default Re: Building QtSql only

    What do you need the VS project file for?
    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.


  9. #9
    Join Date
    Feb 2013
    Posts
    13
    Thanks
    2
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Building QtSql only

    Better browsing of the code, and possibly a mean to write modified code for Sybase driver

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

    Default Re: Building QtSql only

    You don't need a VS project file for any of those. Especially that a driver is not part of QtSql library but rather a standalone subproject.
    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. QtSQL - Where is My Database?
    By feuerball11 in forum Qt Programming
    Replies: 18
    Last Post: 20th July 2012, 11:02
  2. QtSQL and databse
    By prophet0 in forum Qt Programming
    Replies: 2
    Last Post: 18th December 2011, 06:22
  3. QTSQL on ARM board
    By chaithrakr7 in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 26th March 2011, 04:45
  4. QtSql or QtSql/ ?
    By szisziszilvi in forum Newbie
    Replies: 3
    Last Post: 8th March 2011, 15:44
  5. problem of QtSql
    By cresthong in forum Qt Programming
    Replies: 1
    Last Post: 17th July 2008, 17:48

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.