Add new comment

Qt Windows 64-bit link fails with many errors

I'm porting my image processing application to Windows 10 with Qt 5.14. The port is complete, everything is functional, except for libraw, where I'm having problems linking the static library.

In your windows native building instructions, you say:

if static linking is necessary, one should link applications with library libraw_static.lib and set the preprocessor option /DLIBRAW_NODLL during compilation.

I downloaded the 64 bit archive with the windows binaries; in the lib folder, I found libraw_static.lib, and linked to it. I also set the preprocessor option, trying both "/DLIBRAW_NODLL" and "DLIBRAW_NODLL." In both cases, the link fails with many, many similar errors. For instance...

undefined reference to '__security_check_cookie' demosaic_packs_st.obj
...
collect2.exe: error: ld returned 1 exit status

In my mac build, I link to "libraw.a" and it all works fine. I'm just trying to get the windows build to do the same.

Here's what the Qt project file has as of now...

LIBS += ../LibRaw-0.19.5/lib/libraw_static.lib
DEFINES += DLIBRAW_NODLL

...I also tried...

LIBS += ../LibRaw-0.19.5/lib/libraw_static.lib
DEFINES += /DLIBRAW_NODLL

The build is definitely finding the library, and the preprocessor options should be getting set. And again, static linking works fine under OSX -- it's just the windows linking that's failing.

Can you help?

Forums: