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. [Solved]Link error
Forum Updated to NodeBB v4.3 + New Features

[Solved]Link error

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

    Hi guys,

    I build my project and finally whole batch of errors like below appeared, looks like linking has some problems, by the way, I run C++ project on ubuntu 64bit OS. and I installed 64bits OS on my 32Bit computer

    welcome any idea

    @main.o: In function neoseis::BusinessObject::setCurrentUser(QString const&)': /home/administrator/QtProjects/Source/Trunk/CrossSection-build-desktop/../../Trunk/AppLibrary/models/BusinessObject.h:59: undefined reference to neoseis::BusinessObject::m_currentUser'
    CrossSectionPresenter.o: In function CrossSectionPresenter': /home/administrator/QtProjects/Source/Trunk/CrossSection-build-desktop/../CrossSection/CrossSectionPresenter.cpp:101: undefined reference to neoseis::ScrollViewPresenter::ScrollViewPresenter(QString const&, neoseis::View2D*)'
    /home/administrator/QtProjects/Source/Trunk/CrossSection-build-desktop/../CrossSection/CrossSectionPresenter.cpp:104: undefined reference to `neoseis::Presenter2D::view() const'@

    1 Reply Last reply
    0
    • M Offline
      M Offline
      msx_br
      wrote on last edited by
      #2

      The information provided is not enough to help you.

      But ins most cases you need to add to your .pro file:

      In case of linking problem regarding one internal ( made by you ) function, you
      must include the .ccp file ( BusinessObject and Presenter2D ).

      In case of 3rd party library, you must include the .lib ( or .a ) in your .pro file

      msx_br - Brazil (Netherlands)

      1 Reply Last reply
      0
      • P Offline
        P Offline
        pmjz
        wrote on last edited by
        #3

        @QT += core gui opengl sql xml
        CONFIG +=console
        TARGET = CrossSection
        TEMPLATE = app
        win32:RC_FILE += CrossSection.rc

        SOURCES += main.cpp
        CrossSectionPresenter.cpp
        Bootstrapper.cpp
        CrossSectionView.cpp

        HEADERS +=
        CrossSectionPresenter.h
        CrossSectionView.h \

        INCLUDEPATH += ../
        ../AppLibrary/
        ../BusinessObjects/ \

        CONFIG(debug, debug|release){
        LIBS +=
        -L../AppLibrary-build-desktop/debug -lAppLibrary
        -L../BusinessObjects-build-desktop/debug -lBusinessObjects
        }

        CONFIG(release, debug|release){
        LIBS +=
        -L../AppLibrary-build-desktop/release -lAppLibrary
        -L../BusinessObjects-build-desktop/release -lBusinessObjects
        }

        RESOURCES +=
        AppResources.qrc
        ../AppLibrary/Resources.qrc
        ../Logging/LoggingResources.qrc

        OTHER_FILES +=
        qt.conf
        CrossSection.rc
        @

        1 Reply Last reply
        0
        • P Offline
          P Offline
          pmjz
          wrote on last edited by
          #4

          thanks a lot, the problem is fixed because of the wrong place where I put .o in. the solution is just to remove the subfolder of the debug and release
          @CONFIG(debug, debug|release){
          LIBS +=
          -L../AppLibrary-build-desktop -lAppLibrary
          -L../BusinessObjects-build-desktop -lBusinessObjects
          }

          CONFIG(release, debug|release){
          LIBS +=
          -L../AppLibrary-build-desktop -lAppLibrary
          -L../BusinessObjects-build-desktop -lBusinessObjects
          }@

          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