[Speex-dev] visual studio 2005 - help getting speex workin'

monk at rq3.com monk at rq3.com
Tue Nov 11 09:38:07 PST 2008


Hey there, I'm having trouble getting speex working with a project that
uses it.  For some quick background, the game Quake 3 was GPL'ed a while
ago.  Some programmers decided to throw it into a public svn and improve
on it, called it ioquake3.  One of the blokes integrated speex into
ioquake3 and it works, but I have troubles getting it to compile/link
properly with Visual Studio 2005.  I am not a highly skilled programmer
and am not highly skilled at using Visual Studio, so I apologize if I'm
doing something obviously wrong.

My development environment is set up according to this step-by-step set of
instructions:

http://ioquake.org/forums/viewtopic.php?f=12&t=55

There is one .sln file with five .vcproj files attached.  Speex is used in
the "quake3" project as far as I can tell.  In the code, there's an IFDEF
called "USE_VOIP".  I go to the properties of "quake3" and add "USE_VOIP"
to the Preprocessor Directives section and that activates the speex code.

And then things don't work out too well.

ioquake3 has the speex \libspeex and \include\speex folders integrated as
\libspeex\include\speex, which should be fine.  I have added my Additional
Include Directories to include ..\..\libspeex\include and that seems to
work ok.

I then set to release build and do a clean and rebuild all, I get linker
errors about undefined symbols related to speex.  Ok, so I go to the speex
website and download the 1.2b3 win32 binaries and use the .lib files
there; I put them in the right place and add them to the Additional
Dependencies.  And everything compiles and links fine except for ONE
symbol.  Doh!

So the guy who integrated speex to ioquake3 used the 1.2rc1 code and the
latest .lib's are for the 1.2b3 code.

So I'm told, just add the speex .c files to your project and compile them
directly.  I see that ioquake3 has done this with JPEG support and some
other stuff, so I figure what the heck, I'll give it a shot.

Under the "quake3" project, I add a new filter called "speex" and shove
*.c from \libspeex into there.  I try compiling but it wants a
preprocessor directive for FLOATING_POINT or FIXED_POINT.  Someone else
mentioned USE_ALLOCA so I gave both a shot.  I ended up with about 800
errors and 800 warnings related to speex files.

So, I know it's possible in theory, I'm just having a heck of a time
getting things to work.  It just magically works using the mingw compiling
environment and linux tools, but Visual Studio wants to defeat me.

I think if there were .lib files for 1.2rc1 (or 1.2 final whenever it
comes out), that would pretty much solve the problem.  However, I don't
know if anyone will make some .lib files to post on the speex website.  If
I could figure out how to compile the speex files within the project, .lib
files would be a moot point anyway.  I'd be happy with either outcome,
though.  ;)

Any ideas or pointers?

For those who made it all the way down to the end, thanks very much for
your time and for reading this!

Monk.


More information about the Speex-dev mailing list