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. [SOLVED] Error LNK2019

[SOLVED] Error LNK2019

Scheduled Pinned Locked Moved Installation and Deployment
4 Posts 2 Posters 965 Views
  • 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.
  • B Offline
    B Offline
    brunosc
    wrote on last edited by
    #1

    Hi guys!

    I am beginner with QT/C++.

    And need to connect to a database (SQL Server) and created a simple program to test the connection.

    But returned me some errors

    Erro:
    !http://i.imgur.com/IQ2GL2O.png(http://i.imgur.com/IQ2GL2O.png)!

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

      Hi and welcome to devnet,

      Did you re-run qmake after adding

      @QT += sql@

      to your pro file ?

      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
      • B Offline
        B Offline
        brunosc
        wrote on last edited by
        #3

        That's worked, thanks SGaist.

        But why do I need to run qmake?

        Whenever I create a new class necessary to run qmake?

        Thx again.

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

          Because you added a new module to use with your application

          Not when adding new classes. However you will have to if you add/remove the Q_OBJECT macro in your QObject derived classes.

          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

          • Login

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