Error during linking when trying to use FMOD in Cocoa app
I am trying to use FMOD for the audio in my game and I am getting multiple definitions of symbol errors when linking during the build process in ProjectBuilder.
There are seven multiple definition errors and they are listed here:
ld: multiple definitions of symbol std::exception::what() const
ld: multiple definitions of symbol std::bad_exception::~bad_exception [in-charge deleting]()
ld: multiple definitions of symbol std::exception::~exception [in-charge deleting]()
ld: multiple definitions of symbol std::unexpected()
ld: multiple definitions of symbol std::set_unexpected(void (*)())
ld: multiple definitions of symbol std::terminate()
ld: multiple definitions of symbol std::set_terminate(void (*)())
One of the two definitions of these symbols seems to come from libstdc++.a as shown here:
ld: multiple definitions of symbol std::exception::what() const
/Users/bobbo/Desktop/DigiKid/libfmod.a(NewMore.cp.o) private external definition of std::exception::what() const in section (__TEXT,__coalesced_text)
/usr/lib/gcc/darwin/3.1/libstdc++.a(eh_exception.o) private external definition of std::exception::what() const in section (__TEXT,__text)
I never manually included libstdc++.a in my project so I'm guessing it comes from one of the frameworks I'm using.
The frameworks I'm using are OpenGL, ApplicationServices, AudioUnit, Cocoa, Carbon, Foundation, and AppKit though I will probably remove AudioUnit if I get FMOD working okay.
So anyway, if anyone knows how to make these errors go away please let me know. libstdc++.a sounds kind of important so I'm guessing doing anything to that would not be a good idea.
Thanks ahead of time.
Robert
There are seven multiple definition errors and they are listed here:
ld: multiple definitions of symbol std::exception::what() const
ld: multiple definitions of symbol std::bad_exception::~bad_exception [in-charge deleting]()
ld: multiple definitions of symbol std::exception::~exception [in-charge deleting]()
ld: multiple definitions of symbol std::unexpected()
ld: multiple definitions of symbol std::set_unexpected(void (*)())
ld: multiple definitions of symbol std::terminate()
ld: multiple definitions of symbol std::set_terminate(void (*)())
One of the two definitions of these symbols seems to come from libstdc++.a as shown here:
ld: multiple definitions of symbol std::exception::what() const
/Users/bobbo/Desktop/DigiKid/libfmod.a(NewMore.cp.o) private external definition of std::exception::what() const in section (__TEXT,__coalesced_text)
/usr/lib/gcc/darwin/3.1/libstdc++.a(eh_exception.o) private external definition of std::exception::what() const in section (__TEXT,__text)
I never manually included libstdc++.a in my project so I'm guessing it comes from one of the frameworks I'm using.
The frameworks I'm using are OpenGL, ApplicationServices, AudioUnit, Cocoa, Carbon, Foundation, and AppKit though I will probably remove AudioUnit if I get FMOD working okay.
So anyway, if anyone knows how to make these errors go away please let me know. libstdc++.a sounds kind of important so I'm guessing doing anything to that would not be a good idea.
Thanks ahead of time.
Robert
I am using FMOD in my Cocoa project and I don't think I had to change anything... so it must be conflicting with one of your other frameworks?
I forgot to mention that most of the source files I'm using are .cpp's. That's probably a big reason why libstdc++.a is being used.
I don't think so. I think that would require you rebuilding the library from modified source.
just to let you know, I added a few C++ classes to a cocoa app today that had fMod already going, and I got those same 7 errors. To be honest I'm finding fMod isn't as great as they say anyway... pausing of mods doesn't seem to work, sounds don't play on some systems, and some midi files don't seem to play. It does, however have a lot of juicy features.
It would seem its still rather buggy on the mac platform
It would seem its still rather buggy on the mac platform
Chopper, iSight Screensavers, DuckDuckDuck: http://majicjungle.com
Quote:Originally posted by BobimusPrime
Is there some way of removing symbols from a library?
You can break the library into its object files, using ar -x then make a new library, excluding the object files you don't want.
I did this to get rid of some stuff from libfmod.a (dynamic_cast was one) and was surprised to find that it worked! This was for a carbon app though (WMD), not cocoa.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| FMOD and Cocoa | Holmes | 8 | 4,002 |
Jul 23, 2003 08:43 PM Last Post: Holmes |
|
| What's the difference between FMOD and mikmod? | ThrottleMonkey | 5 | 3,211 |
Apr 30, 2003 04:08 PM Last Post: Mars_999 |
|
| FMOD - MAC Version | Himiona | 5 | 3,212 |
Apr 25, 2003 08:04 PM Last Post: Mars_999 |
|

