0
0

Hello,

I’m really a newbie in C++ and FMOD and all the specific terms, so don’t shoot me if i’m saying something totally crap or doing something totally wrong.

So, I wanted to run an example, the playstream example. What I’ve done:
I setted-up Eclipse with the CDT plugin, and configured it with a tutorial for MingGW using the QT-framework. This works all fine, I can write (basic) C++ programs and so on.

Now I love multimedia and I wanted to use FMOD for a basic player. So I copy pasted the playstream example to my working dir copied fmod.h and fmod.hpp also to there. I also copied fmodex.dll to there. But now when i want to build my project I get a lot of errors. I think i’ve a problem with libfmodex.a . How do I add it or what do i have to do with it?? I really don’t have a clue what i have to do. If somebody could help this newbie I would really appreciate it. Thanx!

These are the errors:

C:/MinGW/bin/mingw32-make.exe -f Makefile.Debug
mingw32-make.exe[1]: Entering directory D:/coding/mp3cpp/src'
g++ -c -g -g -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"C:/Qt/4.0.1/include/QtGui" -I"C:/Qt/4.0.1/include/QtCore" -I"C:/Qt/4.0.1/include" -I"." -I"C:/Qt/4.0.1/include/ActiveQt" -I"debug" -I"." -I"C:/Qt/4.0.1/mkspecs/win32-g++" -o debug\Main.o Main.cpp
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,windows -o "debug\src.exe" object_script.src.Debug -L"C:\Qt\4.0.1\lib" -lmingw32 -lqtmaind -lQtCored4 -lQtGuid4
Main.cpp:205:5: warning: no newline at end of file
./debug\Main.o(.text+0x3a0): In function
main’:
D:/coding/mp3cpp/src/Main.cpp:93: undefined reference to _ZN4FMOD6System10getVersionEPj@8'
./debug\Main.o(.text+0x404):D:/coding/mp3cpp/src/Main.cpp:102: undefined reference to
_ZN4FMOD6System4initEijPv@16′
./debug\Main.o(.text+0x43f):D:/coding/mp3cpp/src/Main.cpp:105: undefined reference to _ZN4FMOD6System12createStreamEPKcjP22FMOD_CREATESOUNDEXINFOPPNS_5SoundE@20'
./debug\Main.o(.text+0x4c1):D:/coding/mp3cpp/src/Main.cpp:119: undefined reference to
_ZN4FMOD6System9playSoundE17FMOD_CHANNELINDEXPNS_5SoundEbPPNS_7ChannelE@20′
./debug\Main.o(.text+0x4ff):D:/coding/mp3cpp/src/Main.cpp:136: undefined reference to _ZN4FMOD7Channel9getPausedEPb@8'
./debug\Main.o(.text+0x51a):D:/coding/mp3cpp/src/Main.cpp:137: undefined reference to
_ZN4FMOD7Channel9setPausedEb@8′
./debug\Main.o(.text+0x528):D:/coding/mp3cpp/src/Main.cpp:143: undefined reference to _ZN4FMOD6System6updateEv@4'
./debug\Main.o(.text+0x547):D:/coding/mp3cpp/src/Main.cpp:152: undefined reference to
_ZN4FMOD7Channel9isPlayingEPb@8′
./debug\Main.o(.text+0x573):Dmingw32-make.exe[1]: Leaving directory D:/coding/mp3cpp/src'
:/coding/mp3cpp/src/Main.cpp:158: undefined reference to
_ZN4FMOD7Channel9getPausedEPb@8′
./debug\Main.o(.text+0x5aa):D:/coding/mp3cpp/src/Main.cpp:164: undefined reference to _ZN4FMOD7Channel11getPositionEPjj@12'
./debug\Main.o(.text+0x5e1):D:/coding/mp3cpp/src/Main.cpp:170: undefined reference to
_ZN4FMOD5Sound9getLengthEPjj@12′
./debug\Main.o(.text+0x751):D:/coding/mp3cpp/src/Main.cpp:188: undefined reference to _ZN4FMOD5Sound7releaseEv@4'
./debug\Main.o(.text+0x76d):D:/coding/mp3cpp/src/Main.cpp:190: undefined reference to
_ZN4FMOD6System5closeEv@4′
./debug\Main.o(.text+0x789):D:/coding/mp3cpp/src/Main.cpp:192: undefined reference to _ZN4FMOD6System7releaseEv@4'
./debug\Main.o(.text$_ZN4FMOD13System_CreateEPPNS_6SystemE[FMOD::System_Create(FMOD::System**)]+0xd): In function
Z16FMOD_ErrorString11FMOD_RESULT’:
D:/coding/mp3cpp/src/fmod_errors.h:21: undefined reference to `FMOD_System_Create@4′
collect2: ld returned 1 exit status
mingw32-make.exe[1]: *** [debug\src.exe] Error 1
C:\MinGW\bin\mingw32-make.exe: *** [debug] Error 2

  • You must to post comments
0
0

I’ve found how to add libfmodex.a in my .pro file.
Now I’ve tried a even morre basic example:

include “../FmodApi/inc/fmod.hpp”

include “../FmodApi/inc/fmod_errors.h”

include <windows.h>

include <stdio.h>

include <conio.h>

int main(int argc, char *argv[])
{
FMOD::System *system;
FMOD::Sound *sound;
System_Create(&system);
system->init(100, FMOD_INIT_NORMAL, 0);
system->createStream(“Mylo.mp3”, FMOD_SOFTWARE, 0, &sound);
}

And even this gives me problems, again undefined references to, god know where:

C:/MinGW/bin/mingw32-make.exe -f Makefile.Debug
mingw32-make.exe[1]: Entering directory D:/coding/mp3cpp/src'
g++ -c -g -g -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_CORE_LIB -DQT_GUI_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"C:/Qt/4.0.1/include/QtGui" -I"C:/Qt/4.0.1/include/QtCore" -I"C:/Qt/4.0.1/include" -I"." -I"C:/Qt/4.0.1/include/ActiveQt" -I"debug" -I"." -I"C:/Qt/4.0.1/mkspecs/win32-g++" -o debug\Main.o Main.cpp
Main.cpp:67:5: warning: no newline at end of file
g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-subsystem,windows -o "debug\src.exe" object_script.src.Debug -L"C:\Qt\4.0.1\lib" -lmingw32 -lqtmaind ../FmodApi/lib/libfmodex.a -lQtCored4 -lQtGuid4
./debug\Main.o(.text+0x360): In function
main’:
D:/coding/mp3cpp/src/Main.cpp:58: undefined reference to _ZN4FMOD6System4initEijPv@16'
./debug\Main.o(.text+0x38d):D:/coding/mp3cpp/src/Main.cpp:59: undefined reference to <!-- e --><a href="mailto:
_ZN4FMOD6System11createSoundEPKcjP22FMOD_CREATESOUNDEXINFOPPNS_5SoundE@20mingw32-make.exe“>_ZN4FMOD6System11createSoundEPKcjP22FM ... 2-make.exe</a><!-- e -->[1]: Leaving directoryD:/coding/mp3cpp/src’

collect2: ld returned 1 exit status
mingw32-make.exe[1]: *** [debug\src.exe] Error 1
C:\MinGW\bin\mingw32-make.exe: *** [debug] Error 2

Thanks for everyone who can help me!!

  • You must to post comments
0
0

K, and is it possible to compile the source with MinGW myself?

About the C-way, where can I find an overview of the C api/methods (or how do i say). I only find for C++ in the FMOD Ex API explanation?

thnx for answering,
nh

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.