QT Creator – 3rd Party Lib – Undefined Reference-Collection of common programming errors

I have added a 3rd party library to my project in QT Creator. It appears to add fine and the header file is working and it allows QT to auto-complete code with the lib.

When I compile, it has undefined references to the different classes / functions in the lib. I’m assuming that the header file is loading but not the actual lib.

This is what I have in my project file:

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../Libraries/BinaryMagic/Lib/ -lMCDBVC6R
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../Libraries/BinaryMagic/Lib/ -lMCDBVC6D

INCLUDEPATH += $$PWD/../../Libraries/BinaryMagic/Include
DEPENDPATH += $$PWD/../../Libraries/BinaryMagic/Include

Its also worth noting that the lib is compiled by and for VC++ 6 and I’m using minGW32. I contacted the 3rd party lib company and they assured me that there should be no such problem.

So Any Ideas ?

UPDATE: This is the compile output

14:53:16: Running steps for project AV_Command...
14:53:16: Configuration unchanged, skipping qmake step.
14:53:16: Starting: "C:\Qt\Qt5.0.1\Tools\MinGW\bin\mingw32-make.exe" 
C:\Qt\Qt5.0.1\5.0.1\mingw47_32\bin\qmake.exe -spec win32-g++ -o Makefile ..\..\AV_Command\AV_Command.pro
C:/Qt/Qt5.0.1/Tools/MinGW/bin/mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory 'C:/Projects/Builds/AV_Command-build-Desktop_Qt_5_0_1_MinGW_32bit-Release'
g++ -Wl,-s -Wl,-subsystem,windows -mthreads -o release\AV_Command.exe object_script.AV_Command.Release  -lmingw32 -lqtmain -lKernel32 -lShell32 -LC:/Libraries/BinaryMagic/Lib/ -lMCDBVC6R -LC:\Qt\Qt5.0.1\5.0.1\mingw47_32\lib -lQt5Widgets -lQt5Sql -lQt5Xml -lQt5Gui -lQt5Core -llibEGL -llibGLESv2 -lgdi32 -luser32 
./release\caseburner.o:caseburner.cpp:(.text+0xb0): undefined reference to `CMCDBurner::CMCDBurner()'
./release\caseburner.o:caseburner.cpp:(.text+0xca): undefined reference to `CMCDBurner::GetDeviceCount()'
c:/qt/qt5.0.1/tools/mingw/bin/../lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld.exe: ./release\caseburner.o: bad reloc address 0xbc in section `.rdata'
collect2.exe: error: ld returned 1 exit status
Makefile.Release:102: recipe for target 'release\AV_Command.exe' failed
mingw32-make[1]: *** [release\AV_Command.exe] Error 1
mingw32-make[1]: Leaving directory 'C:/Projects/Builds/AV_Command-build-Desktop_Qt_5_0_1_MinGW_32bit-Release'
makefile:34: recipe for target 'release' failed
mingw32-make: *** [release] Error 2
14:53:17: The process "C:\Qt\Qt5.0.1\Tools\MinGW\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project AV_Command (kit: Desktop Qt 5.0.1 MinGW 32bit)
When executing step 'Make'
  1. The problem, based upon those error messages, is very likely that minGW32 cannot link against libraries compiled with MSVC.

    In particular, the error bad reloc address 0xbc is typical of compiler incompatibility (see, for example, this question: Build error: bad reloc address).

Originally posted 2013-11-09 21:43:38.