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. Pkg config problem when cross compiling Qt 5.8 Linux->Windows (mingw)
Forum Updated to NodeBB v4.3 + New Features

Pkg config problem when cross compiling Qt 5.8 Linux->Windows (mingw)

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
1 Posts 1 Posters 1.3k 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.
  • D Offline
    D Offline
    DeadSix
    wrote on last edited by DeadSix
    #1

    I am cross compiling qt5.8.0 from Linux to Windows 64bit, everything seemingly builds fine however the generated PKG-Config files (e.g Qt5Core.pc, etc) contain a invalid path to library files:
    For example:

    Libs.private: -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lmpr -lwinmm -lz  /libqtpcre.a
    

    Notice the leading slash '/' for /libqtpcre.a, not only that some files will also have libraries defined as "-llibqtpcre.a" with the suffix ".a"
    Anyone has any idea what causes this?
    My configuration line for qt looks like this:

    -opensource -force-pkg-config -confirm-license -c++std c++11 -xplatform win32-g++ -device-option CROSS_COMPILE=$xprefix -no-use-gold-linker -release -static -prefix $mprefix -no-icu -opengl desktop -no-glib -accessibility -nomake examples -nomake tests -system-zlib -system-libjpeg -no-pch -no-direct2d -v
    

    special env vars for pkg config:

    	export PKG_CONFIG="$htarget-pkg-config"
    	export PKG_CONFIG_SYSROOT_DIR="$cdir/xcompiler/"
    	export PKG_CONFIG_LIBDIR="$mprefix/lib/pkg-config"
    

    EDIT: The local pkg config files, for example ./qt-everywhere-opensource-src-5.8.0/qtactiveqt/lib/pkgconfig/Qt5AxBase.pc for example contains full paths like:
    -L/*/qt-everywhere-opensource-src-5.8.0/qtbase/lib /*/qt-everywhere-opensource-src-5.8.0/qtbase/lib/libQt5Widgetsd.a
    However
    the Installed ones do contain just the basename with a slash prefixed,not sure where the slash is being added from during the install.

    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