Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. mxe and quazip
Qt 6.12 LTS is out! See what's new in the release blog

mxe and quazip

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

    Hi, it's my first time cross-compiling with Qt (from linux to windows). I found mxe useful for building Qt, it does not have the quazip package though. I built it from source using mxe's mingw32, so now I have both quazip.a and quazip.so in the same directory. I figured if the linker can find the .so, it should find the .a, but when I compile my app for windows I get a bunch of undefined references about Quazip. Does anyone have an idea what's happening?

    My project file is a bit messy from trying different things to make it work, but here it is: http://pastebin.com/aUj962tv (still compiles fine for linux)

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

      I have used quazip but I don't know what 'mxe' is. This is from your project file:

      LIBS += -L/home/gabars/programming/quazip-0.7.2/quazip -lquazip -lz
      

      shouldn't this be:

      LIBS += -L/home/gabars/programming/quazip-0.7.2/quazip  -lquazip -lzlib
      

      I am not sure what the definition 'QUAZIP_STATIC' does. If the idea is to statically link to your program you might want to investigate this a bit.

      CONFIG: DEFINES += QUAZIP_STATIC
      
      1 Reply Last reply
      0
      • G Offline
        G Offline
        gabars
        wrote on last edited by gabars
        #3

        @Rondog said in mxe and quazip:

        shouldn't this be:

        LIBS += -L/home/gabars/programming/quazip-0.7.2/quazip  -lquazip -lzlib
        

        Thanks, I changed it.

        I am not sure what the definition 'QUAZIP_STATIC' does. If the idea is to statically link to your program you might want to investigate this a bit.

        CONFIG: DEFINES += QUAZIP_STATIC
        

        This was for when I tried to add all the quazip files directly to my project. I forgot why that didn't work.

        I found a fork which seems to have support for quazip, if that doesn't work I'll try adding adding the quazip source files to my project again.

        Edit:
        I used the command "nm -an libquazip.a | c++filt |grep ZN6QuaZipC1ERK7QString" and I got

                 U __ZN6QuaZipC1ERK7QString
        000005d0 T __ZN6QuaZipC1ERK7QString
                 U __ZN6QuaZipC1ERK7QString
        

        and the errors I get look like

        undefined reference to `_imp___ZN6QuaZipC1ERK7QString'
        

        After a quick search I found out that imp_ is used for shared libraries, so ld is looking for shared symbols in a static lib?

        1 Reply Last reply
        0
        • G Offline
          G Offline
          gabars
          wrote on last edited by
          #4

          I gave up, borrowed my parent's laptop with windows, installed mingw and qt, compiled quazip and my project. If anyone has tipsfor cross-compiling with quazip, it would be appreciated.

          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
          • Unsolved