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. Discrepancies in link order between Windows/Linux/Mac?
Forum Updated to NodeBB v4.3 + New Features

Discrepancies in link order between Windows/Linux/Mac?

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
3 Posts 2 Posters 329 Views 2 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.
  • O Offline
    O Offline
    Olivier MATROT
    wrote on last edited by Olivier MATROT
    #1

    I'm having difficulties building a Qt solution on Mac.
    Basically I have a static library used in the main program.

    It builds fine on Linux.

    On my Mac, I have the following error:

    Undefined symbols for architecture x86_64:
      "initWf(int, int, int, int)", referenced from:
          CardioS::init() in libcardios.a(cardios.o)
    ld: symbol(s) not found for architecture x86_64
    

    The code is located in the static library.

    Here is the failing command line:

    /Library/Developer/CommandLineTools/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names  -arch x86_64 -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=10.12 -Wl,-rpath,@executable_path/../Frameworks -Wl,-rpath,/Users/omatrot/Qt/5.13.1/clang_64/lib -o ../CardioSensys.app/Contents/MacOS/CardioSensys obj/main.o obj/qcustomplot.o obj/inputsubjectdata.o obj/RadarDashboard.o obj/mainwindow.o obj/CustomButton.o obj/CustomPlot.o obj/RCDialog.o obj/O2Dialog.o obj/TADialog.o obj/VCDialog.o obj/IRDialog.o obj/EADialog.o obj/RespDialog.o obj/CaptureDevice.o obj/qrc_ressources.o obj/moc_CustomButton.o obj/moc_inputsubjectdata.o obj/moc_mainwindow.o obj/moc_RadarDashboard.o obj/moc_stoppingthread.o obj/moc_qcustomplot.o   -F/Users/omatrot/Qt/5.13.1/clang_64/lib -L.. -lcardios -framework QtPrintSupport -framework QtSvg -framework QtWidgets -framework QtGui -framework QtSerialPort -framework QtCore -framework DiskArbitration -framework IOKit -framework OpenGL -framework AGL
    

    I can see the reference to my library though:

    -lcardios
    

    Could it be a link order problem? If so how could I solve it without breaking the build on Linux?

    K 1 Reply Last reply
    0
    • O Olivier MATROT

      I'm having difficulties building a Qt solution on Mac.
      Basically I have a static library used in the main program.

      It builds fine on Linux.

      On my Mac, I have the following error:

      Undefined symbols for architecture x86_64:
        "initWf(int, int, int, int)", referenced from:
            CardioS::init() in libcardios.a(cardios.o)
      ld: symbol(s) not found for architecture x86_64
      

      The code is located in the static library.

      Here is the failing command line:

      /Library/Developer/CommandLineTools/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names  -arch x86_64 -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -mmacosx-version-min=10.12 -Wl,-rpath,@executable_path/../Frameworks -Wl,-rpath,/Users/omatrot/Qt/5.13.1/clang_64/lib -o ../CardioSensys.app/Contents/MacOS/CardioSensys obj/main.o obj/qcustomplot.o obj/inputsubjectdata.o obj/RadarDashboard.o obj/mainwindow.o obj/CustomButton.o obj/CustomPlot.o obj/RCDialog.o obj/O2Dialog.o obj/TADialog.o obj/VCDialog.o obj/IRDialog.o obj/EADialog.o obj/RespDialog.o obj/CaptureDevice.o obj/qrc_ressources.o obj/moc_CustomButton.o obj/moc_inputsubjectdata.o obj/moc_mainwindow.o obj/moc_RadarDashboard.o obj/moc_stoppingthread.o obj/moc_qcustomplot.o   -F/Users/omatrot/Qt/5.13.1/clang_64/lib -L.. -lcardios -framework QtPrintSupport -framework QtSvg -framework QtWidgets -framework QtGui -framework QtSerialPort -framework QtCore -framework DiskArbitration -framework IOKit -framework OpenGL -framework AGL
      

      I can see the reference to my library though:

      -lcardios
      

      Could it be a link order problem? If so how could I solve it without breaking the build on Linux?

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @Olivier-MATROT

      Is the class CardioS and initWf in the same library?
      I would assume that CardioS is part of libcardios as the link return indicates. Therefore, the question is if initWf is also part of that library. If yes, you need to check if there is a macro exclusion or similar is happening.
      If no, the object or library holding initWf is missing.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      1
      • O Offline
        O Offline
        Olivier MATROT
        wrote on last edited by
        #3

        Yes they are indeed.

        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