Apparently I can't link librarys to save my life

This is a discussion on Apparently I can't link librarys to save my life within the C++ Programming forums, part of the General Programming Boards category; I am making a game that use SDL, OpenGL, and FMOD. I got it to compile both on Windows and ...

  1. #1
    Registered User IdioticCreation's Avatar
    Join Date
    Nov 2006
    Location
    Lurking about
    Posts
    229

    Apparently I can't link librarys to save my life

    I am making a game that use SDL, OpenGL, and FMOD. I got it to compile both on Windows and Linux (After messing with it for several hours). Then I added FMOD for sounds, and I can compile it on Linux, but not on Windows. I'm getting linker errors saying that all the FMOD functions are undefined.

    I'm using the current stable version, 4.10.01 32bit. So I downloaded the API and included the header files and linked the libs (There is a large selection). I originally tried libfmodex.a and fmodex_lcc.lib. But I ended up trying all the different libraries, none of which worked.

    I guess....the answer is probably specific to my compiler (Code::Blocks), but I'm really stumped and could use some help.

    Thanks!
    Last edited by IdioticCreation; 12-08-2007 at 10:38 PM.

  2. #2
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,699
    What compiler?

    gg

  3. #3
    Registered User IdioticCreation's Avatar
    Join Date
    Nov 2006
    Location
    Lurking about
    Posts
    229
    CodeBlocks gcc and mingw

  4. #4
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,699
    Copy and past the first couple of errors you get from the compiler.

    gg

  5. #5
    Registered User IdioticCreation's Avatar
    Join Date
    Nov 2006
    Location
    Lurking about
    Posts
    229
    Blah, I'm getting a different error now. I'm gonna mess with it a bit, then I'll be back if I have questions.

  6. #6
    Registered User
    Join Date
    Nov 2005
    Posts
    673
    I personally could not get FMOD to work on Code::Blocks. Although you can use the irrKlang audio API for sound which is what i did. Google irrKlang and se if it will serve your purpose.

  7. #7
    Registered User IdioticCreation's Avatar
    Join Date
    Nov 2006
    Location
    Lurking about
    Posts
    229
    I checked irrKlang out, it looks nice, but I'd like to use FMOD.

    Here are the linker errors I'm getting.
    Code:
    Linking console executable: SDLapp.exe
    .objs\main.o:main.cpp:(.text+0x51f): undefined reference to `_ZN4FMOD5Sound7releaseEv@4'
    .objs\main.o:main.cpp:(.text+0x53b): undefined reference to `_ZN4FMOD5Sound7releaseEv@4'
    .objs\main.o:main.cpp:(.text+0x557): undefined reference to `_ZN4FMOD5Sound7releaseEv@4'
    .objs\main.o:main.cpp:(.text+0x573): undefined reference to `_ZN4FMOD6System5closeEv@4'
    .objs\main.o:main.cpp:(.text+0x58f): undefined reference to `_ZN4FMOD6System7releaseEv@4'
    
    ...
    
    collect2: ld returned 1 exit status
    Since you had trouble linking it also, I googled to see if there was some kind of problem, but I found nothing.

  8. #8
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,699

  9. #9
    Registered User IdioticCreation's Avatar
    Join Date
    Nov 2006
    Location
    Lurking about
    Posts
    229
    Ew, thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. what's wrong...
    By dreamkk in forum C Programming
    Replies: 9
    Last Post: 10-09-2003, 07:12 AM
  2. destructor with a link list
    By Bones in forum C++ Programming
    Replies: 1
    Last Post: 09-24-2003, 01:01 PM
  3. Major glitch losing source files with MSVC++ and WinXP
    By JasonD in forum C++ Programming
    Replies: 10
    Last Post: 08-14-2003, 01:15 PM
  4. Undefined Structure in Link List
    By _Cl0wn_ in forum C Programming
    Replies: 1
    Last Post: 03-22-2003, 05:57 PM
  5. .lib vs .h vs .dll
    By Shadow12345 in forum C++ Programming
    Replies: 13
    Last Post: 01-01-2003, 05:29 AM

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