Errors

kinggori

11-02-2007 17:58:17

sorry for bothering you again guys :(

Now after I added all the dependencies, fixed the xram problem etc. when I try building I get 8 Errors and 59 Warnings:

Any idea what I'm doing wrong?



Warning 1 warning C4005: 'AL_SOURCE_TYPE' : macro redefinition c:\mydev\liav\dependencies\include\al\altypes.h 92
Warning 2 warning C4005: 'ALAPI' : macro redefinition c:\mydev\LIAV\Dependencies\include\al\al.h 35
Warning 3 warning C4005: 'ALAPIENTRY' : macro redefinition c:\mydev\LIAV\Dependencies\include\al\al.h 37

<Removed for brevity - CaseyB>

kinggori

11-02-2007 18:14:51

I think I know what the problem is: there are 2 al.h files!! :-( :-( :-(

there is one in:
C:\mydev\LIAV\Dependencies\include\AL
and one in
C:\Program Files\OpenAL 1.1 SDK\include



Here's what each one has:

C:\mydev\LIAV\Dependencies\include\AL


<Removed for brevity - CaseyB>


C:\Program Files\OpenAL 1.1 SDK\include


<Removed for brevity - CaseyB>

CaseyB

11-02-2007 18:48:02

Where did the other one come from?

kinggori

11-02-2007 19:20:42

i guess someone in the previous years was trying to add sound but never succeeded. This is a pretty huge project which is being developed over

Error 7 error C2143: syntax error : missing ';' before 'constant' c:\mydev\LIAV\src\CAXApplication.cpp 96
Error 8 error C2106: '=' : left operand must be l-value c:\mydev\LIAV\src\CAXApplication.cpp 96
Warning 9 warning C4005: 'ALAPI' : macro redefinition C:\Program Files\OpenAL 1.1 SDK\include\al.h 34
Warning 10 warning C4005: 'ALAPIENTRY' : macro redefinition C:\Program Files\OpenAL 1.1 SDK\include\al.h 35
Error 11 error C2120: 'void' illegal with all types C:\Program Files\OpenAL 1.1 SDK\include\al.h 78
Warning 12 warning C4091: 'typedef ' : ignored on left of 'void' when no variable is declared C:\Program Files\OpenAL 1.1 SDK\include\al.h 78

<Removed for brevity - CaseyB>

CaseyB

11-02-2007 20:43:10

Are the files that you renamed to old* actually IN your project instead of just being included?

kinggori

11-02-2007 20:47:58

they are included
but i changed all the includes in my project files to reflect this change

do you have any idea what the above error means?

I'm feeling very depressed :cry:

CaseyB

11-02-2007 21:03:15

do you have any idea what the above error means?Yes, it means that those files are still being found by your project. This means that they are either still in the include paths for the project, in the include paths for the IDE or in the project itself (look in the Solution Explorer).

kinggori

11-02-2007 22:18:55

do you have any idea what the above error means?Yes, it means that those files are still being found by your project. This means that they are either still in the include paths for the project, in the include paths for the IDE or in the project itself (look in the Solution Explorer).

i deleted wach and every file related to sound and feixed all the includes and everything and compiled and it was working fine

I then included ogreal.h etc. and it compiled fine :D

now when I try creating a sound object attaching it to a node eetc. I get the following wierd link error! any idea what the hell this means? :shock:

Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall OgreAL::Sound::setRelativeToListener(bool)" (__imp_?setRelativeToListener@Sound@OgreAL@@QAEX_N@Z) referenced in function "public: __thiscall CAXCore::CAXWorldObject::CAXWorldObject(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class Ogre::SceneManager *,class Ogre::Vector3 const &,float,float)" (??0CAXWorldObject@CAXCore@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVSceneManager@Ogre@@ABVVector3@5@MM@Z) CAXWorldObject.obj
Error 2 error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall OgreAL::Sound::setGain(float)" (__imp_?setGain@Sound@OgreAL@@QAEXM@Z) referenced in function "public: __thiscall CAXCore::CAXWorldObject::CAXWorldObject(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class Ogre::SceneManager *,class Ogre::Vector3 const &,float,float)" (??0CAXWorldObject@CAXCore@@QAE@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAVSceneManager@Ogre@@ABVVector3@5@MM@Z) CAXWorldObject.obj

<Removed for brevity - CaseyB>

CaseyB

11-02-2007 23:09:06

This means that there is a problem with the linker path or you aren't linking in OgreAL.lib.

kinggori

11-02-2007 23:11:10

please ignore the above error

now my problem is I'd like to try a very simple test of backgroup music

so i need to add these 3 lines:

OgreAL::Sound *sound = soundManager->createSound("Roar", "roar.wav", true);
mSceneNode->attachObject(sound);
sound->play();



problem is wherever i add them i get a runtime error

Could you please help me add these 3 lines to the code. I'm sure it goes into one of the following 2 files:


CAXApplication.cpp


<Removed for brevity - CaseyB>


CAXWorldObject.cpp:


<Removed for brevity - CaseyB>

CaseyB

12-02-2007 02:03:02

I have edited your post so that they only have relevant information. In the future would you please refrain from posting entire files and error reports and stick to the important bits?

About why you are getting runtime errors it is impossible to say without knowing what the error is. Also, there is no way that I can tell you the right place to load a sound without being familiar with your program. So I can try to help you figure out what the error means, but it's going to be up to you to decide what that means to your app.