[Qt-interest] Error trying to link .lib file

fungos fungos at gmail.com
Sat Apr 25 17:50:08 CEST 2009


I'm trying to use a library that is .lib (DevIL Image Library). My .pro is this:

TARGET  = devil-qt
TEMPLATE = lib
CONFIG += plugin
VERSION = 1.0.0
QT += core gui

INCLUDEPATH += "D:/Development/libs/DevIL-SDK-x86-1.7.8/include"
win32:LIBS += "D:/Development/libs/DevIL-SDK-x86-1.7.8/lib/DevIL.lib"
"D:/Development/libs/DevIL-SDK-x86-1.7.8/lib/ILU.lib"
"D:/Development/libs/DevIL-SDK-x86-1.7.8/lib/ILUT.lib"

HEADERS += devil-qt-plugin.hpp \
		   devil-qt-handler.hpp
SOURCES += devil-qt-plugin.cpp \
		   devil-qt-handler.cpp

DESTDIR += $$[QT_INSTALL_PLUGINS]/imageformats

And when I try to build it wont find references to DevIL functions:

Starting: C:/Qt/2009.02/mingw/bin/mingw32-make.exe -w
C:\Qt\2009.02\mingw\bin\mingw32-make.exe: Entering directory
`D:/Development/qt/qt-devil'
C:/Qt/2009.02/mingw/bin/mingw32-make.exe -f Makefile.Debug
mingw32-make.exe[1]: Entering directory `D:/Development/qt/qt-devil'
g++ -enable-stdcall-fixup -Wl,-enable-auto-import
-Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -shared
-Wl,--out-implib,c:\Qt\2009.02\qt\plugins\imageformats\libdevil-qt1.a
-o c:\Qt\2009.02\qt\plugins\imageformats\devil-qt1.dll
debug/devil-qt-plugin.o debug/devil-qt-handler.o
-L"c:\Qt\2009.02\qt\lib" debug\devil-qt_resource_res.o
D:/Development/libs/DevIL-SDK-x86-1.7.8/lib/DevIL.lib
D:/Development/libs/DevIL-SDK-x86-1.7.8/lib/ILU.lib
D:/Development/libs/DevIL-SDK-x86-1.7.8/lib/ILUT.lib -lQtGuid4
-lQtCored4
mingw32-make.exe[1]: Leaving directory `D:/Development/qt/qt-devil'
C:\Qt\2009.02\mingw\bin\mingw32-make.exe: Leaving directory
`D:/Development/qt/qt-devil'
Creating library file: c:\Qt\2009.02\qt\plugins\imageformats\libdevil-qt1.a
debug/devil-qt-handler.o(.text+0x178): In function `ZN12DevILHandlerC2Ev':
D:/Development/qt/qt-devil/devil-qt-handler.cpp:39: undefined
reference to `_imp__ilInit at 0'
debug/devil-qt-handler.o(.text+0x186):D:/Development/qt/qt-devil/devil-qt-handler.cpp:40:
undefined reference to `_imp__iluInit at 0'
debug/devil-qt-handler.o(.text+0x27e): In function `ZN12DevILHandlerC1Ev':
D:/Development/qt/qt-devil/devil-qt-handler.cpp:39: undefined
reference to `_imp__ilInit at 0'


What is wrong there?

-- 
Animal Liberation Front
http://www.animal-liberation.com/



More information about the Qt-interest-old mailing list