PDA

View Full Version : Qt and fmod



Alex63
30th June 2006, 13:11
Hi,

I would like to use fmod, could someone explain me what must I do to use this library...

I installed fmod,
I added the LIBS+=fmod.lib in my .pro
I added the #include "fmod.hpp" line in my project

But it doesn't work ! the compilator doesn't find the fmod.hpp file.

Please help !

Alex

jpn
30th June 2006, 13:15
Try:


#include <cmath>
double a = fmod(2.0, 2.0);


Edit: Heh, maybe I should have read the post a bit more carefully.. :p

jacek
30th June 2006, 13:35
I added the #include "fmod.hpp" line in my project

But it doesn't work ! the compilator doesn't find the fmod.hpp file.
Add:
INCLUDEPATH += /path/to/fmod/headers
If the linker can't find the library, change LIBS to:
LIBS += -L/path/to/fmod/libs -lfmod

Alex63
30th June 2006, 16:24
hello,

I 've tried some things, now it's a little better but it still doesn't work, I can't use the fmod library.
I 'm using windows, qt and MinGW.

My .pro :

TEMPLATE = app
TARGET +=
DEPENDPATH += .
INCLUDEPATH += C:\FMODProgrammersAPIWin64\api\inc
LIBS += libfmodex.a
QT+=opengl

The errors :

D:\Documents and Settings\AlexNinja\Bureau\stagius2>make
mingw32-make -f Makefile.Release
mingw32-make[1]: Entering directory `D:/Documents and Settings/AlexNinja/Bureau/
stagius2'
g++ -c -O2 -O2 -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_D
LL -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT
-DQT_NEEDS_QMAIN -I"C:/Qt/4.1.3/include/QtCore" -I"C:/Qt/4.1.3/include/QtGui" -I
"C:/Qt/4.1.3/include/QtOpenGL" -I"C:/Qt/4.1.3/include" -I"C:/FMODProgrammersAPIW
in64/api/inc" -I"C:/Qt/4.1.3/include/ActiveQt" -I"release" -I"." -I"c:\Qt\4.1.3\
mkspecs\win32-g++" -o release\Ecran_3D.o Ecran_3D.cpp
In file included from Ecran_3D.cpp:3:
Ecran_3D.h:72: error: ISO C++ forbids declaration of `FSOUND_STREAM' with no typ
e
Ecran_3D.h:72: error: expected `;' before '*' token
mingw32-make[1]: *** [release\Ecran_3D.o] Error 1
mingw32-make[1]: Leaving directory `D:/Documents and Settings/AlexNinja/Bureau/s
tagius2'
mingw32-make: *** [release] Error 2


Thank you all for helping...

Alex63
30th June 2006, 17:10
OK it 's working !

final configuration :

TEMPLATE = app
TARGET +=
DEPENDPATH += .
INCLUDEPATH += C:\FMODProgrammersAPI\api\inc
QT+=opengl
LIBS += C:\FMODProgrammersAPI\api\lib\libfmodex.a (for mingw)