build gstreamer program on linux with i586-mingw32msvc for windows

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

build gstreamer program on linux with i586-mingw32msvc for windows

giorgino
Hi all,
         I made some days ago a C program that creates a pipe for gstreamer and it works well on linux. Now I need to create the windows version of the same program and I'm in trouble about steps to perform using i586-mingw32msvc under linux. Firstly I modified header including the correct windows version (for example winsock.h instead of <sys/socket.h>  etc). But for compilation I need gstreamer library so how I can proceed to have an sdk environment under linux in order to compile program and obtain executable for windows?
Please help me it is quite important.

Good day
G.
Reply | Threaded
Open this post in threaded view
|

Re: build gstreamer program on linux with i586-mingw32msvc for windows

Thomas Loewe
Hi,

I do this with a simple buildscript and it works fine for me under ubuntu:

prefix=$(pwd)/devel
export CC=i586-mingw32msvc-gcc
export CCC=i586-mingw32msvc-g++
export LD=i586-mingw32msvc-ld
export PKG_CONFIG_LIBDIR=${prefix}/lib/pkgconfig/
export PKG_CONFIG_PATH=${prefix}/lib/pkgconfig/
export CFLAGS="-I${prefix}/include"
export CXXFLAGS="-I${prefix}/include"
export LDFLAGS="-L${prefix}/lib"

For all the required libraries and gstreamer run

./configure \
  --host=i586-mingw32msvc \
  --build=i486-linux-gnu \
  --prefix=$prefix

and then you can simply run "make" and "make install".

Thomas