Re: (no subject)

Chris Robinson <[email protected]> Sat, 05 Nov 2011 11:12:28 -0700
Newsgroups gmane.comp.lib.openal
Message-ID <2866082.ako3e4uFF6@kittycat>
On Friday, November 04, 2011 8:05:03 PM Libor Capak wrote:
> i'm trying to cross-compile openal (git version) for win32 mingw.
> 
> openal-soft/build$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../XCompile.txt
> -DHOST=i586-mingw32msvc -DCMAKE_RC_COMPILER=i586-mingw32msvc-windres
> openal-soft/build$ make
> ...
> [ 96%] Building C object CMakeFiles/openal.dir/Alc/backends/wave.obj
> /home/el/openal-soft/Alc/backends/wave.c:1: warning: -fPIC ignored for
> target (all code is position independent)
> Linking C shared library libopenal.so

Hi.

This is odd. It looks like it's not cross-compiling even though it's using the 
cross-compiler. Did you make sure to clean out the build directory before 
running cmake with those parameters? Where are the executables (and headers 
and libs) for the cross-compiler stored?

> Please help.  I'd like to compile static library too - I don't have
> experience with cmake - so don't know how to change XCompile.txt in
> good way.

To build a static library, add -DLIBTYPE=STATIC when running cmake. Note, 
though, that the static lib is not very well tested, and may not work. Also, 
the lib is LGPL, so the user would need to be able to rebuild the app with 
their own version of the lib. If your app is open source, then it should be 
fine, but using a DLL would generally be a better idea since users could just 
replace that and not bother your app.
_______________________________________________
Openal mailing list
[email protected]
http://opensource.creative.com/mailman/listinfo/openal