This is the first time I try to use FMOD and I got an error. I installed the API, corresponding to FMOD EX, in my computer and I wrote some lines to learn how to play wav files. Here below is the code.

[code:3q90ec9b]#include <stdio.h>

include <conio.h>

include "fmod.h"

int main ()

FMOD_SYSTEM     *system;
FMOD_SOUND      *sound;
FMOD_CHANNEL    *channel=0;

FMOD_System_Init(system, 32, FMOD_INIT_NORMAL, NULL);

FMOD_System_CreateSound(system,&quot;sound01.wav&quot;, FMOD_HARDWARE | FMOD_LOOP_OFF, 0, &amp;sound);
FMOD_Sound_SetMode(sound, FMOD_LOOP_OFF);

FMOD_System_PlaySound(system, FMOD_CHANNEL_FREE, sound, 0, &amp;channel);

while (!_kbhit())
// FMOD_System_Update(system);
return 0;

I am using Visual C++ 5.0 (Microsoft Developer Studio 97). I have copied the files fmod.h, fmod_codec.h, fmod_dsp.h, fmodex.dll and fmodex_vc.lib into the project directory.
I included ‘fmodex_vc.lib’ in the ‘Object/library modules’ and in the project settings and I also included in the directories for include files the path ‘…\FMOD SOUNDSYSTEM\FMOD PROGRAMMERS API\API\LIB’.

The code can be compiled but not executed, the error that appears is

fmodex_vc.lib : fatal error LNK1106: invalid file or disk full: cannot seek to 0x433e5a7c
Error executing link.exe.
test.exe – 1 error(s), 0 warning(s)

I think it has to be with the correct linking of the lib file (needed is to say that I’m not a programmer).

Any help is appreciated.


  • You must to post comments

Hooray, now I am hearing things (I have been linking myself)…

I must have missed the /DWIN32 parameter.

Thank you for your patience with “severe cases” like me. :)

  • You must to post comments

Thank you for your quick reply!

After browsing through the msdn pages I concluded that either
“link fmodex_vc.lib main.obj”
“link /defaultlib:fmodex_vc.lib main.obj”
represents the correct syntax to explicitly link with the desired library, although they led to the same error message as above (attempting to foist a different-version library on the linker with “link fmodex_bc.lib main.obj” had the linker complain about a corrupt library).

Are there any MSVC++ veterans around who can spot my beginners mistake or reproduce the error?

  • You must to post comments

In order to use the C++ interface of fmodex I also got myself the Visual C++ Toolkit and installed it along with the MS Platform SDK. Unfortunately I was not able to link any of the examples after successful compilation:

[quote:24oqcyp8]\examples\3d>cl main.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80×86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation. All rights reserved.

main.obj : error LNK2019: unresolved external symbol “public: enum FMOD_RESULT _
_thiscall FMOD::System::release(void)” (?release@System@FMOD@@QAE?AW4FMOD_RESULT
@@XZ) referenced in function _main
main.obj : error LNK2019: unresolved external symbol “public: enum FMOD_RESULT _
_thiscall FMOD::System::close(void)” (?close@System@FMOD@@QAE?AW4FMOD_RESULT@@XZ


I have tried putting both fmodexp_vc.lib and fmodex_vc.lib either into the “lib” subdirectory of the Visual C++ Toolkit (which is referenced in my corresponding “LIB” environment-variable) or into the same directory as the sourcecode. Passing “fmodex_vc.lib” to the compiler as another parameter did not help as well.

I am new to this build environment, so I am sorry for bothering you with my newbie questions. Has anyone spotted some beginners flaw in my setup? Has anyone experienced the same kind of problem? Has anyone successfully compiled and linked using VC++ with the current version (4.01.05)?

Thanks for any advice!

  • You must to post comments

ok, I’ll check it, thanks.


  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.