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. Need some help cross compiling (and linking)
Forum Updated to NodeBB v4.3 + New Features

Need some help cross compiling (and linking)

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 1 Posters 344 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.
  • R Offline
    R Offline
    RobbieP
    wrote on last edited by
    #1

    Here's my qmake profile ( https://paste.rs/lbU )...I am using some settings from a friend of mine who compiles plugins for a flight sim, so some of this stuff may be unnecessary or causing me the problems I'm having...

    I'm on arch linux using Qt5

    When I try to build for Linux using qmake -spec linux-g++-64 && make -j $NCPUS I get the following error:

    g++ -m64 -Wl,-O1 -o bin/GaugeMaker2App obj/main.o obj/renderarea.o obj/window.o obj/moc_renderarea.o obj/moc_window.o   -L/usr/X11R6/lib64 -static-libgcc -static-libstdc++ -Wl,--exclude-libs,ALL -nodefaultlibs -Wl,--exclude-libs,ALL /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib/libstdc++.a -lm -lQt5Core /usr/lib/libQt5Svg.so /usr/lib/libQt5Widgets.so /usr/lib/libQt5Gui.so /usr/lib/libQt5Core.so -lGL -lpthread   
    /usr/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../lib/libstdc++.a(cp-demangle.o): undefined reference to symbol 'sprintf@@GLIBC_2.2.5'
    /usr/bin/ld: /usr/lib/libc.so.6: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
    

    When I try to build for windows using qmake -set CROSS_COMPILE x86_64-w64-mingw32- && qmake -spec win32-g++ && make -j $NCPUS I get the following error:

    make[1]: Entering directory '/home/robbie/Documents/Programming/GaugeMaker2'
    make[1]: *** No rule to make target '/usr/lib/libQt5Svg.a', needed by 'bin/GaugeMaker2.exe'.  Stop.
    

    The windows compile error I think is because I might need a cross compile capable Qt5 library? I dunno. The linux svg missing lib is probably because of my .pro settings. Anyone help? I'm new to Qt.

    1 Reply Last reply
    0
    • R Offline
      R Offline
      RobbieP
      wrote on last edited by
      #2

      For cross compiling...looks like the /usr/lib/libQt5Svg.a would be a static library...and I have the .so shared libraries...I don't necessarily want to build static...is there something I'm doing in my qmake profile that's making this static linked?

      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