Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Cannot open include file
Forum Updated to NodeBB v4.3 + New Features

Cannot open include file

Scheduled Pinned Locked Moved Installation and Deployment
3 Posts 2 Posters 1.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dndeed
    wrote on last edited by
    #1

    Hi,

    I am trying to use mysql commands in my Qt project creator and I keep hitting walls.

    Initially, i just wrote "#include "mysql_driver" " and got the "Cannot open include file" error. If I change that to "#include "C:\Program Files\MySQL\MySQL Connector C++ 1.1.3\include\mysql_driver" " then the first error is replace with "error: C1083: Cannot open include file: 'boost/scoped_ptr.hpp': No such file or directory"

    I think this is because mysql_driver.h calls boost methods, but cannot find them. I can go through and add every single header file I need and every file that they call, but it seems like there should be an easier way.

    Does anyone have any ideas what is up with this?

    Thanks for your help

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Just to be sure: you want to connect to a mysql database ? Why not use the QtSql module ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dndeed
        wrote on last edited by
        #3

        This is the first time I have ever used mysql and I'm trying to adapt someone else's code. I tried using the #include <QtSql> but the commands that it uses are different from my predecessor's and I don't sql well enough to adapt them. For instead, he used:
        sql::Driver *driver;
        sql::Connection *con;
        sql::Statement *stmt;
        sql::ResultSet *res;

        to create his connector variables, which didn't work when I tried it with QtSql.

        I would like to learn more about what he was trying to do and how QtSql works, but I thought it might be easier just to replicate his code.

        Thanks

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved