Results 1 to 3 of 3

Thread: Unclear path

  1. #1
    Join Date
    Jan 2007
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Unclear path

    For windows Qt and a mysql driver, what vars should be set and with what

    using: #include <QSqlDatabase>

    during 'make' I get an error: main.cpp:5:24: QSqlDatabase: No such file or directory

    qsqldatabase.h file lives in C:\Qt\4.1.1\include\Qt

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Unclear path

    Have you added QT += sql to your project file?

  3. #3
    Join Date
    Jan 2007
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Unclear path

    The short answer is:
    No. Did not know I needed to.
    I am assuming that by project file you mean test1.pro file.
    I added sql to the QT var and ran qmake test1.pro <no errors>
    I then ran 'make' < no errors.
    Thank you - that seemed to fix my error problems

    The long answer is:
    I am so new to this that the first question that came to mind when I read your post is "What is a project file?"

    Is there a good tutorial for absolute beginners like me?

    I purchased the only 2 books I could find on Qt4 and have read on line posts for months (on and off) to try and get Qt4 installed with MySql drivers and create a "SIMPLE" program to test it.
    While these books are good, they leave out basic foundation information that I need.
    Therefore, I have been unsuccessful.
    I am not new to programming but I am new to C++ at this level. I have written programs in Visual C++ and Borland C++ Builder using MySql databases, but they take care of nearly all compiling and linking for you. You install the IDE, you create the program and off you go. The path and vars are already set for you.
    There must be a step-by-step guide somewhere to help install and configure Qt and then create, compile and link a very simple program to access a very simple table in MySql or other database. I just cannot find it. Once I get the basics, I can run with it from there but the basics are a mystery to me.

    Thank you for your reply
    Last edited by mongenix; 7th January 2007 at 16:27.

Similar Threads

  1. Replies: 3
    Last Post: 25th August 2010, 12:39
  2. valid a path name
    By klaus1111 in forum Newbie
    Replies: 3
    Last Post: 23rd July 2006, 15:07
  3. Which path should I use?
    By Dark_Tower in forum Newbie
    Replies: 3
    Last Post: 8th April 2006, 12:09
  4. MinGW Windows Library Search Path
    By zztop in forum Qt Programming
    Replies: 4
    Last Post: 26th March 2006, 15:18
  5. Set include file path in KDevelop
    By zlatko in forum KDE Forum
    Replies: 2
    Last Post: 16th January 2006, 11:12

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.