M
M
Mercury132017-09-08 16:05:11
MinGW
Mercury13, 2017-09-08 16:05:11

MinGW: what is the _imp__ prefix and how to get rid of it?

I tried to statically compile libZip using Qt Creator. The library appeared, was found out, when I tried to connect it to the program, this is what happened.

C:\Mercury\Common\StaxLike\StaxZip.cpp:14: error: undefined reference to `_imp__zip_wopen'
C:\Mercury\Common\StaxLike\StaxZip.cpp:36: error: undefined reference to `_imp__zip_close'

(zip_wopen is my Unicode quick fix of zip_open)
Obviously I'm missing some compiler flags, but which ones?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mercury13, 2017-09-08
@Mercury13

Again, you have to answer yourself. I have three mistakes.
Once.

//#define ZIP_EXTERN __declspec(dllimport)
#define ZIP_EXTERN
Obviously, libzip is only meant to be compiled into a DLL, period.
Two. -lz. Well, this is understandable, and our MinGW distribution has this library.
Three - did not fully finish Unicode.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question