EUREKA!

derutydragon

22-02-2007 22:56:25

I fixed my prior errors! I have one last question :D

-------------- Build: Debug in OgreAL ---------------
Linking dynamic library: ..\lib\Debug\OgreAL_d.dll
Info: resolving Ogre::StringUtil::BLANK by linking to __imp___ZN4Ogre10StringUtil5BLANKE (auto-import)
Info: resolving Ogre::Vector3::ZERO by linking to __imp___ZN4Ogre7Vector34ZEROE (auto-import)
Info: resolving Ogre::Vector3::NEGATIVE_UNIT_Z by linking to __imp___ZN4Ogre7Vector315NEGATIVE_UNIT_ZE (auto-import)
Info: resolving vtable for Ogre::MovableObjectFactoryby linking to __imp___ZTVN4Ogre20MovableObjectFactoryE (auto-import)
Info: resolving Ogre::Vector3::UNIT_Y by linking to __imp___ZN4Ogre7Vector36UNIT_YE (auto-import)
Cannot export .idata$4: symbol not found
Cannot export .idata$5: symbol not found
Cannot export .idata$6: symbol not found
Cannot export .text: symbol not found
Cannot export OpenAL32_NULL_THUNK_DATA: symbol not found
Creating library file: ..\lib\Debug\libOgreAL_d.a
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 2 seconds)
0 errors, 0 warnings


The file exists for the change and I haven't tested it yet but...
Those cannot export things... thats not exactly good right?

I managed to fix the prior Ogre undefined errors by adding the "exampleapplication" header into the files that had errors.

CaseyB

23-02-2007 01:23:05

WOW!
I wonder what those errors mean! Can you create and run Ogre Apps that don't involve OgreAL, like the demos?

I am also not sure why including the exampleApplication header would fix errors, unless I am not explicitly including headers that I am using and they are getting including by things I am including and Visual Studio is ok with that but GCC is not. I will take a look at that this weekend! But so far that's a very good job! Would you mind posting the steps you went through to get everything set up and, maybe, emailing me your Code::Blocks project files?

derutydragon

23-02-2007 02:34:28

You mean the ones the OgreSDK has right? Those run fine :D.

But heres basically what I did.

First I had vorbis and ogg linking errors so I added all those libraries (individually and with full paths :roll:)
Then I had those Ogre errors so I added ExampleApplication.h to the file getting that error
After that I dug up my old printed copy of the OgreSDK Setup Instructions and did all of that (now I don't remember if it was this step or the prior one that fixed the error)

And thats about all I did that I think is significant. I did a bunch of other stuff and I really don't think they fixed anything.

I was beginning to think I would never get OgreAL to work so I messed around with the OpenAL SoundManager at the wiki and thats how I figured most of the stuff here out :D (although I did get it to work once...it wouldn't play sound :shock: )


EDIT:

After about 10-15 min. of research I have come to the conclusion I have missed SOMETHING....
Soooooo I'm hot on the trail! :D

Oooh and I'm still slightly confused about your Demos question. In order for me to open the OgreSDK demos I have to close the OgreAL workspace? Doesn't that defeat the purpose of opening the Demos to begin with?

CaseyB

23-02-2007 03:22:09

Oooh and I'm still slightly confused about your Demos question. In order for me to open the OgreSDK demos I have to close the OgreAL workspace? Doesn't that defeat the purpose of opening the Demos to begin with?No, I just wanted to make sure that it was OgreAL that was having trouble with GCC and not Ogre in general! ;) When you finally get this working I would LOVE to integrate it into the baseline so we can finally have decent Code::Blocks support!

derutydragon

23-02-2007 03:47:33

Alright I think I found what I needed, but.....

I'm sorta surprised I got this far in Ogre with out knowing this

How am I supposed to link .o files? I read that I shouldn't mix dll and library files with object files....so how am I supposed to link it?

CaseyB

23-02-2007 04:28:02

Code::Blocks should, for the most part, generate the linker command for you, in Visual Studio it looks like this for OgreAL:/OUT:"C:\Development\OgreAL-Eihort\lib\Release\OgreAL.dll" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Development\Ogre-Eihort\ogrenew/lib" /LIBPATH:"C:\Development\Ogre-Eihort\ogrenew\OgreMain/lib/Release" /LIBPATH:"C:\Development\OpenAL 1.1 SDK/libs/Win32" /LIBPATH:"C:\Development\freealut-1.1.0-bin/lib" /LIBPATH:"../../ogg/win32/Static_Release" /LIBPATH:"../../vorbis/win32/Vorbis_Static_Release" /LIBPATH:"../../vorbis/win32/VorbisFile_Static_Release" /DLL /MANIFEST /MANIFESTFILE:"Release\OgreAL.dll.intermediate.manifest" /DEBUG /PDB:"c:\Development\OgreAL-Eihort\lib\Release\OgreAL.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG /MACHINE:X86 /ERRORREPORT:PROMPT OgreMain.lib OpenAL32.lib ALut.lib vorbis_static.lib vorbisfile_static.lib ogg_static.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
And like this for the Basic Demo:/OUT:"C:\Development\OgreAL-Eihort\Demos\Basic_Demo\Release\Basic_Demo.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Development\Ogre-Eihort\ogrenew/lib" /LIBPATH:"C:\Development\Ogre-Eihort\ogrenew/Dependencies/lib/Release" /LIBPATH:"$OGRE_HOME)/lib" /LIBPATH:"C:\Development\OpenAL 1.1 SDK/libs/Win32" /LIBPATH:"../../lib/Release" /MANIFEST /MANIFESTFILE:"Release\Basic_Demo.exe.intermediate.manifest" /DEBUG /PDB:"c:\Development\OgreAL-Eihort\Demos\Basic_Demo\Release\Basic_Demo.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG /MACHINE:X86 /ERRORREPORT:PROMPT OgreMain.lib OgreAL.lib OpenAL32.lib OIS.lib AntTweakBar.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
I am pretty sure that GCC uses - instead of /, but that's what it should look like.

derutydragon

26-02-2007 20:29:58

alright I think the errors because I don't have user32.lib on my computer or a couple of those other ones. I'm trying to get them but the SDK installation is kinda slow so I thought I'd just post an update :D

derutydragon

27-02-2007 03:16:41

Alright now I added a ton bunch of library files and re-installed parts of MinGW and I got rid of all the errors but 1.


Cannot export OpenAL32_NULL_THUNK_DATA: symbol not found

Thats the only one now :/

CaseyB

27-02-2007 03:21:23

That's really good! I have no idea what that error means, but I just want to let you know that I really appreciate your efforts!

derutydragon

27-02-2007 03:55:11

Crap... I did something......wrong.... All I did was move the lib declaration for files that I use on both debug and release into the main one, but I guess that might be a good thing too. I got rid of that one error and now get the following XD. Then again the other error my just not be showing up now :/


Creating library file: ..\lib\Debug\libOgreAL_d.a
Debug\src\OgreALSoundManager.o:OgreALSoundManager.cpp:(.text+0x4ae): undefined reference to `_imp__alcGetString'
Debug\src\OgreALSoundManager.o:OgreALSoundManager.cpp:(.text+0x500): undefined reference to `_imp__alcGetString'
Debug\src\OgreALSoundManager.o:OgreALSoundManager.cpp:(.text+0xccb): undefined reference to `_imp__alcGetEnumValue'
Debug\src\OgreALSoundManager.o:OgreALSoundManager.cpp:(.text+0xee5): undefined reference to `_imp__alcGetEnumValue'
Debug\src\OgreALSoundManager.o:OgreALSoundManager.cpp:(.text+0x10ff): undefined reference to `_imp__alcGetEnumValue'
Debug\src\OgreALSoundManager.o:OgreALSoundManager.cpp:(.text+0x1319): undefined reference to `_imp__alcGetEnumValue'
Debug\src\OgreALSoundManager.o:OgreALSoundManager.cpp:(.text+0x1533): undefined reference to `_imp__alcGetEnumValue'
Debug\src\OgreALSoundManager.o:OgreALSoundManager.cpp:(.text+0x174d): more undefined references to `_imp__alcGetEnumValue' follow
Debug\src\OgreALSoundManager.o:OgreALSoundManager.cpp:(.text+0x31a8): undefined reference to `_imp__alcGetString'
Debug\src\OgreALSoundManager.o:OgreALSoundManager.cpp:(.text+0x31fa): undefined reference to `_imp__alcGetString'
Debug\src\OgreALSoundManager.o:OgreALSoundManager.cpp:(.text+0x39c5): undefined reference to `_imp__alcGetEnumValue'
Debug\src\OgreALSoundManager.o:OgreALSoundManager.cpp:(.text+0x3bdf): undefined reference to `_imp__alcGetEnumValue'
Debug\src\OgreALSoundManager.o:OgreALSoundManager.cpp:(.text+0x3df9): undefined reference to `_imp__alcGetEnumValue'
Debug\src\OgreALSoundManager.o:OgreALSoundManager.cpp:(.text+0x4013): undefined reference to `_imp__alcGetEnumValue'
Debug\src\OgreALSoundManager.o:OgreALSoundManager.cpp:(.text+0x422d): undefined reference to `_imp__alcGetEnumValue'
Debug\src\OgreALSoundManager.o:OgreALSoundManager.cpp:(.text+0x4447): more undefined references to `_imp__alcGetEnumValue' follow
Debug\src\OgreALSoundManager.o:OgreALSoundManager.cpp:(.text+0x84cf): undefined reference to `_imp__alSpeedOfSound'
Debug\src\OgreALSoundManager.o:OgreALSoundManager.cpp:(.text+0x9138): undefined reference to `_imp__alcGetString'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 17 seconds)
0 errors, 1 warnings



Its odd though because I have the alc.h header file added....

CaseyB

27-02-2007 04:05:10

So you have the OpenAL32.lib, or OpenAL32.a file listed where it should be? It looks to me like it can't find the library, so it can't find those functions.

derutydragon

27-02-2007 04:35:57

OpenAL32 is in the right place. I'm pretty sure its Alut related since alc is a header file and the function itself is delcared in the alc.h header. Alut.lib is linking properly though :/

CaseyB

27-02-2007 04:52:24

Right, alc.h is the header file, but the functions in that header are compiled into the OpenAL lib, not the alut lib, the only header that contains alut functions in alut.h.

derutydragon

27-02-2007 18:38:14

Okay nevermind I fixed the undefined errors and now I have the Cannot export OpenAL32_NULL_THUNK_DATA: symbol not found error again :D

Its just 1 step backward and 1 step forward for me :D

CaseyB

27-02-2007 18:48:37

I've found a thread where someone was getting the same error with glut and someone suggested> Try adding this:
> -Wl,--exclude-symbols,glut32_NULL_THUNK_DATA
...
actually starts with a ASCII DEL (127) character. You can try
excluding that symbol, but if that doesn't work you're going to have to
disable automatic exporting of all symbols and just export the symbols
you're actually using.


Here's a link to that conversation:
http://lists-archives.org/mingw-users/0 ... _data.html