Linking OgreOggSound in CodeBlocks

PJani

18-09-2009 02:06:11

Hy. Do i have to re compile OOS to link in Codeblocks MinGW?

stickymango

18-09-2009 11:57:19

You shouldn't need to?

PJani

18-09-2009 13:04:18

I have undefined references.
i added to linker ogreoggsound.a and OgreOggSound_d.lib.
I d know what am i missing.


..\project57_prj\obj\Debug\main.o||In function `ZN11Application13windowClosingEPN4Ogre12RenderWindowE':|
C:\OgreSDK\include\OgreWindowEventUtilities.h:(.text$_ZN11Application9soundTestEv[Application::soundTest()]+0x72)||undefined reference to `OgreOggSound::OgreOggSoundManager::getSingletonPtr()'|
C:\OgreSDK\include\OgreWindowEventUtilities.h:(.text$_ZN11Application9soundTestEv[Application::soundTest()]+0x81)||undefined reference to `OgreOggSound::OgreOggSoundManager::getSound(std::string const&)'|
C:\OgreSDK\include\OgreWindowEventUtilities.h:(.text$_ZN11Application9soundTestEv[Application::soundTest()]+0x89)||undefined reference to `OgreOggSound::OgreOggISound::play()'|
C:\OgreSDK\include\OgreWindowEventUtilities.h:(.text$_ZN11Application24initializeResourceGroupsEv[Application::initializeResourceGroups()]+0xfb)||undefined reference to `OgreOggSound::OgreOggSoundManager::getSingletonPtr()'|
..\project57_prj\obj\Debug\main.o||In function `ov_header_fseek_wrap':|
C:\Documents and Settings\PJani\Desktop\project57_prj\OggSound\include\vorbis\vorbisfile.h|54|undefined reference to `OgreOggSound::OgreOggSoundManager::createSound(std::string const&, std::string const&, bool, bool, bool)'|
||=== Build finished: 5 errors, 0 warnings ===|

stickymango

18-09-2009 14:11:55

Ah sorry, didn't realise you were on linux, the ogreoggsound.a is not up to date for the latest SVN builds, you will need to rebuild it on linux, I don't have access to a linux machine at present.

PJani

18-09-2009 14:40:08

MinGW is gcc version for Windows :p

stickymango

18-09-2009 14:44:41

Okay, you confused me saying you were linking to OgreOggSound.a :?

Have you solved your problems now?

PJani

18-09-2009 17:19:56

*.a is static lib for gcc compilers mingw is gcc compiler for windows.

Noupe still having problems... :o

stickymango

18-09-2009 17:23:25

Interesting, I've never used codeblocks before so wasn't aware .a files were used on windows machines also, have you re-compiled the lib again?

PJani

18-09-2009 18:40:58

Still not.

PJani

18-09-2009 21:18:42

Trying to build oos with make, first time

stickymango

18-09-2009 22:59:15

I used make on linux to build the lib and didn't have any problems last time I built it, is there a reason why you aren't using Visual Studio on windows?

PJani

19-09-2009 02:58:58

im more comftable with code blocks, i am very favour of open source tools and linux. I have licence for VS2008 Pro, but i rather use code blocks with mingw...better documentation...better comunity...

I upgraded mingw to latest 3.4.5 and changed Ogre to 1.6.1, but still having problems...

stickymango

19-09-2009 12:38:13

Thats fair enough, unfortuantely I don't know anything about code::blocks, I did attempt to download, install and open the vis studio project into it but it failed to find any of my source files :?

Maybe if you could guide me to decent tutorial for it I could attempt to get it building in CB, and therefore provide project files also...

PJani

19-09-2009 13:06:25

Any way...If i will fail to link again with mingw in next 3h(till i get full version of vs9 from msdnaa and get some space on disk) i will convert project to vs9
I have continious linking problems with mingw not only with this library but also with others...
I finaly builded static vorbs vorbsfile and ogg in c::b, and when i tried to link OOS i had another linking problem it didnt link to vorbs_static.

And this problem is very anoing...

Mejbe i will only change compiler in C::B to VS9. will see...

PJani

19-09-2009 15:12:45

Changing to VS9. It was time i had problems with linking everywhere...only problem follows...rebuilding boost 3/4h...and other libraries...will see if it will link to oos

stickymango

19-09-2009 20:34:01

okay, I had a nightmare trying to compile with code::blocks too, I have since successfully compiled the static object library version in linux, libogreoggsound.a, there were some errors due to a code shift around but I've fixed that now. You should have no problem with vc 2005/2008 as thats what I use daily.

Hope your up and running soon!

PJani

20-09-2009 02:46:48

When i run application i get the application failed to initialize properly (0xC0150002). Click.... :roll:

ups...SOLVED...forgot to rebuild and replace library :p :p

stickymango

20-09-2009 15:35:48

Great, your up and running?

I'm still using vc2005 express so you would need to rebuild the lib in vc2008.

PJani

22-09-2009 16:05:48

Yep i did and it works great.
I have one quick question.

I can create(with OgreOggSoundManager::createSound) as many as is source limit? or i can play as that many sounds at once? Becouse if i can only create that much sounds im screwd, i have 400 different sounds to load.
if this a problem is there any way to create sound factory so when is sound needed is "cloned"(if source limit allow it) in to buffer and play it when is no more needed sound clone in buffer is removed, but sound "speaker" is still attached to some object in ogre, when some event happens sound is again cloned in sound buffer and...

stickymango

22-09-2009 16:09:34

Glad you got it working! :)

You can create as many sounds as you like, the source limit defines how many sounds can be played simultaneously and is hardware dependent, any sounds duplicated will share an audio buffer between them (Static Sounds ONLY). Does that answer your question?

PJani

22-09-2009 18:52:09

Yep that was it.

Thank you. I love this lib.

stickymango

22-09-2009 19:34:19

Glad you like it :)