compiling a simple Fmod program

This is a discussion on compiling a simple Fmod program within the Game Programming forums, part of the General Programming Boards category; I'm trying to get a simple progam to compile that uses FMod. When I compile it produces this error: C:\projects\fmodtest\test.c ...

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    380

    compiling a simple Fmod program

    I'm trying to get a simple progam to compile that uses FMod. When I compile it produces this error:

    C:\projects\fmodtest\test.c
    too many arguments to function `FSOUND_Sample_Load'

    Why?

    I'm using Dev-C++ 5 as my programming environment. Incase I haven't setup things up properly, I have fmod.h located in dev-cpp\include\fmod and fmod.lib in dev-cpp\libs.

    Here's the code:
    Code:
    #include <stdio.h>
    #include "fmod.h"
    
    int main(void)
    {
       FSOUND_SAMPLE* sound;
       FSOUND_Init(44100, 32, 0);
       sound = FSOUND_Sample_Load(FSOUND_FREE,"C:/projects/plain_pong/score.wav",FSOUND_NORMAL,0, 0);
       FSOUND_PlaySound(FSOUND_FREE,sound);
       getchar();
       FSOUND_Sample_Free(sound);
       
       FSOUND_Close();
    
       return 0;      
    }
    Don't you dare hit me on the head, you know I'm not normal.
    A Stooge Site
    Green Frog Software

  2. #2
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    you must include the proper libraries.

    add this:

    #pragma comment(lib, "fmodvc.lib")


    and tell me if it works. make sure fmodvc.lib is in the same directory. obviously this is the library for visual studio, so if you don't use vc then it wont' work.

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    380
    No, that doesn't work for me, but I found my problem. I had to change fmod.h to fmod/fmod.h
    Don't you dare hit me on the head, you know I'm not normal.
    A Stooge Site
    Green Frog Software

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help with a very simple program
    By htdefiant in forum C++ Programming
    Replies: 13
    Last Post: 08-14-2007, 01:27 PM
  2. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 12:27 PM
  3. [Help] Simple Array/Pointer Program
    By sandwater in forum C Programming
    Replies: 3
    Last Post: 03-30-2007, 02:42 PM
  4. simple silly program
    By verbity in forum C Programming
    Replies: 5
    Last Post: 12-19-2006, 05:06 PM
  5. I need help on a formula for this simple program.
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 01-28-2002, 09:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21