[Openal] Re: compiling using g++

Sven Panne sven.panne at benqmobile.com
Thu Oct 26 05:58:06 PDT 2006


A few remarks:

   * The -D__LINUX_OSS__ is not needed and I have never seen it. Is
there an explanation in the tutorial why it should be used?

   * You have to tell g++ to link against the OpenAL and ALUT libraries.
To do this, add "-lalut" to the g++ commandline. If you have a Linux
distribution with broken library dependencies (Gentoo had this, IIRC),
you have to add "-lopenal", too.

   * conio.h and kbhit() and Windows-specific features, they have to
replaced by something different on other platforms.

   * The return value of clock() should be scaled by CLOCKS_PER_SEC
(1000000 on POSIX systems), the code incorrectly assumes a clock tick of
a few (10?) milliseconds, I guess.

   * The #includes for OpenAL/ALUT are wrong, simply use "#include
<AL/alut>", this will portably pull in everything you need for
OpenAL/ALUT. 

Cheers,
   S.

________________________________

	From: openal-bounces at opensource.creative.com
[mailto:openal-bounces at opensource.creative.com] On Behalf Of Paul Tawk
	Sent: Mittwoch, 25. Oktober 2006 21:53
	To: openal at opensource.creative.com
	Subject: [Openal] Re: compiling using g++
	
	
	I have a file main.cpp in which i copied a file from the OpenAL
tutorial for linux. I use the linux shell and the g++ compiler, but
maybe i shoud link the openAL files when compiling.
	 
	I tried the statment:
	 
	g++ -Wall -D__LINUX_OSS__ -o main main.cpp
	 
	what additional commands should i include in my statment?
	[...]




More information about the Openal mailing list