Reputation: 340
Warning: I'm no Qt expert, so that may be what my problem is.
I built OpenBR on Windows 7 with MinGW following this guide.
This results in libopenbr.dll
and the Unix-style libopenbr.dll.a
.
What do I need to do in my .pro
file to add it to my project? I've added the library path with:
LIBS += -L"include/openbr/lib"
That does not produce any errors. But I can't get the project to acknowledge the existence of the library in that location.
For the library itself, again, named libopenbr.dll.a
, I've tried:
LIBS += -lopenbr
and
LIBS += -lopenbr.dll
and
LIBS += libopenbr.dll.a
and a number of other random guesses, but it never sees the file.
What am I doing wrong? I don't normally think of myself as an idiot, but after being stumped by what should be a pretty easy task, I'm starting to wonder.
Upvotes: 0
Views: 943
Reputation: 126
I looked into this when I tagged the OpenBR 0.3 release, and I couldn't reproduce the issue. Here's what worked for me: QMake Integration
Having said that, there was a tricky part for me in setting up Qt Creator properly with MinGW. By default it was configured to find my Visual Studio installation. I fixed this by tinkering with my manual kit Tools->Options->Build & Run->Manual Desktop (default)
. In particular:
Compiler = MinGW (x86 64bit in C:\mingw64\bin)
Debugger = GDB Engine using "C:\mingw64\bin\gdb.exe"
Qt Version = Qt 5.0.2 (mingw64)
From what I experienced, if these aren't set correctly qmake will look for .lib files instead of .dll.a files when linking. My suspicion is that this will be made easier in Qt 5.1 when MinGW_w64 gets first class support by Qt.
Upvotes: 1