Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Undefined reference

Undefined reference

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 4 Posters 310 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.
  • P Offline
    P Offline
    primator77
    wrote on last edited by
    #1

    Hey folks,

    I'm facing a bit of a challenge here. During the compilation of my application, I'm bombarded with numerous errors, each indicating an "undefined reference" to QSqlRecord, QSqlError, QSqlDatabase, and similar symbols. I'm utilizing .pro files for my project configuration, where I've included the necessary Qt modules:

    QT += core
    QT += network
    QT += sql
    

    It seems like the linker is struggling to find the definitions for these symbols. Any insights or advice on how to resolve this issue would be greatly appreciated!

    sierdzioS JonBJ C 3 Replies Last reply
    0
    • P primator77

      Hey folks,

      I'm facing a bit of a challenge here. During the compilation of my application, I'm bombarded with numerous errors, each indicating an "undefined reference" to QSqlRecord, QSqlError, QSqlDatabase, and similar symbols. I'm utilizing .pro files for my project configuration, where I've included the necessary Qt modules:

      QT += core
      QT += network
      QT += sql
      

      It seems like the linker is struggling to find the definitions for these symbols. Any insights or advice on how to resolve this issue would be greatly appreciated!

      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @primator77 could be the linker but it could also be a missing #include in code. Qt used forward declarations a lot.

      (Z(:^

      1 Reply Last reply
      0
      • P primator77

        Hey folks,

        I'm facing a bit of a challenge here. During the compilation of my application, I'm bombarded with numerous errors, each indicating an "undefined reference" to QSqlRecord, QSqlError, QSqlDatabase, and similar symbols. I'm utilizing .pro files for my project configuration, where I've included the necessary Qt modules:

        QT += core
        QT += network
        QT += sql
        

        It seems like the linker is struggling to find the definitions for these symbols. Any insights or advice on how to resolve this issue would be greatly appreciated!

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by JonB
        #3

        @primator77
        If the errors are during compilation, as you write, then you are not #include-ing the necessary header files.
        If the errors are during linking then you are not linking with the right libraries.
        So which is it?

        1 Reply Last reply
        0
        • P primator77

          Hey folks,

          I'm facing a bit of a challenge here. During the compilation of my application, I'm bombarded with numerous errors, each indicating an "undefined reference" to QSqlRecord, QSqlError, QSqlDatabase, and similar symbols. I'm utilizing .pro files for my project configuration, where I've included the necessary Qt modules:

          QT += core
          QT += network
          QT += sql
          

          It seems like the linker is struggling to find the definitions for these symbols. Any insights or advice on how to resolve this issue would be greatly appreciated!

          C Offline
          C Offline
          ChrisW67
          wrote on last edited by
          #4

          @primator77 Did you re-run qmake after you modified the PRO file?

          1 Reply Last reply
          0
          • Pl45m4P Pl45m4 referenced this topic on

          • Login

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