Advertisement

OpenALDemo issues

Started by December 12, 2004 06:09 PM
5 comments, last by clint8565 20 years, 2 months ago
I can't get the OpenALDemo to work. First I needed eax.h, I found it, now I only have 14 errors left *yippee* they're all the same though: 466 ...\OpenALDemo.cpp `toupper' undeclared (first use this function) The errors are in the OpenALDemo.cpp included in the download
	do
	{
		ch = _getch();
		ch = toupper( ch );
		switch (ch)
		{
			case '1':
				// Stop source
				alSourceStop(source[0]);
				if ((error = alGetError()) != AL_NO_ERROR)
					DisplayALError("alSourceStop 0 : ", error);

they're all at the beginning of a switch case like this, any ideas?
Not sure if toupper() is a standard function, but you could add one easily enough, something like this maybe:

char toupper (char c)
{
if (c >= 'a' && c <= 'z')
return c + 'A' - 'a';
else
return c;
}
Advertisement
not sure what constitutes "standard" (i tend to count anything that is from the old c days as standard) but i believe cstdlib should have it... if not im sure Google knows

hope that helps
-Dan
When General Patton died after World War 2 he went to the gates of Heaven to talk to St. Peter. The first thing he asked is if there were any Marines in heaven. St. Peter told him no, Marines are too rowdy for heaven. He then asked why Patton wanted to know. Patton told him he was sick of the Marines overshadowing the Army because they did more with less and were all hard-core sons of bitches. St. Peter reassured him there were no Marines so Patton went into Heaven. As he was checking out his new home he rounded a corner and saw someone in Marine Dress Blues. He ran back to St. Peter and yelled "You lied to me! There are Marines in heaven!" St. Peter said "Who him? That's just God. He wishes he were a Marine."
Hmmm... I'm getting some pretty nasty results, if I use the "toupper(char c)" function from posit the 14 errors are gone but somehow transformed into 491 totally new errors that have to do with the al... functions not working (I included all the files necessary as well) and the 491st error is:
[General Error] Too many messages; abort.
There must be something terribly wrong with your code. Please fix it.
You know it's bad when when the program tells you personally that it's screwed.
I also Googled for it and it says to #include <ctype.h> and I did and it does the exact same thing as using the function from posit.
About cstdlib I don't have it apparently... but now I do thanks to Google (yes I'm writing this as I try stuff) and cstdlib gives me... 59 errors among which the toupper still exists along with several other files needed which I'm currently searching for. Which I'm hard pressed to find. Any ideas or has anyone gotten the OpenALDemo to work in DevC++? It said all I had to do was move the files and add them to the project and it would work just like that, but I know it never works "just like that."
okay... with cstdlib with each "required" file I find it adds about 10-20 errors so I'm not going to use it
the other way (491 error/ctype.h) most of the errors repeat *whoo* and they're almost all undefined refernece to _imp_al... _imp_alGetString, _imp_alclsExtensionPresent, _imp_alcOpenDevice, etc. and the odd alutLoadWav and alutUnloadWav
Advertisement
interesting I now have only two errors:
Warning ...\Dev-Cpp\Projects\OpenALDemo\Warning .drectve `%.*s' unrecognized
two of those, pretty big reduction from an overflow :), strangely enough it won't execute from within DevC++ but when I go into the folder there is an executable there which seems to work fine, ok now there are no errors and I changed nothing,oh well it works thanks everyone

This topic is closed to new replies.

Advertisement