PDA

View Full Version : Problem adding FMod Lib



XCoding
22nd April 2017, 18:26
Hello everybody,
I started a project with Serial communication and FMOD. The big problem now is that I have no idea how to solve the compiling error of FMOD : here is my .pro file


QT += core gui serialport

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = Launchpad
TEMPLATE = app

DEFINES += QT_DEPRECATED_WARNINGS

SOURCES += main.cpp\
mainwindow.cpp

HEADERS += mainwindow.h

INCLUDEPATH += "C:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\lowlevel\inc"
LIBS += "C:\Program Files (x86)\FMOD SoundSystem\FMOD Studio API Windows\api\lowlevel\lib\libfmod.a"


When I try to compile in DEBUG mode, I get an error saying :

collect2.exe: error: ld returned 1 exit status
mingw32-make[1]: *** [debug\Launchpad.exe] Error 1
mingw32-make: *** [debug] Error 2
Makefile.Debug:65: recipe for target 'debug\Launchpad.exe' failed
mingw32-make[1]: Leaving directory 'C:/Users/Ghislaine/Desktop/Thomas/Launchpad/build-Launchpad-Desktop_Qt_5_8_0_MinGW_32bit-Debug'
Makefile:34: recipe for target 'debug' failed
17:50:05: The process "C:\Qt\Tools\mingw530_32\bin\mingw32-make.exe" end with code 2.
Error when compiling/deploying the project Launchpad (kit : Desktop Qt 5.8.0 MinGW 32bit)
When executing step "Make"

I tried a lot of things that I saw on the internet but can't find what's going wrong !
Thanks to all future helpers ! ;)

d_stranz
22nd April 2017, 19:25
In Windows, DLL and link library files are named with extensions ".DLL" and ".LIB", respectively. It looks like you are trying to link to a linux shared library (".a"). Get the library name correct and it will probably work.

XCoding
22nd April 2017, 19:45
Thank you for the answer but I tried the 3 types of files (.DLL, .LIB & .A) but nothing is working... Still get the same error

Little precision => my compiler is MinGW-32 bits, my computer is 64 bits...
If it can help you.

d_stranz
26th April 2017, 17:45
Little precision => my compiler is MinGW-32 bits, my computer is 64 bits...

Then my guess is that you have a 64-bit version of FMod installed. The fact that it appears to be installed to "Program Files (x86)" is a hint. This is usually where 64-bit apps are installed, just the opposite of what you would think. You're going to probably have to find a 32-bit version of FMod and install that, or build the 32-bit libraries if you have source code.