[PD-dev] Cross-compiling for Windows on Debian

Martin Peach martin.peach at sympatico.ca
Mon Jan 22 15:45:26 CET 2007


Frank Barknecht wrote:
> Hallo,
> Frank Barknecht hat gesagt: // Frank Barknecht wrote:
>
>   
>> could someone give me a hint how to compile a single-file c-source
>> external ("externals/vbap/rvbap.c" to be honest) on Debian for
>> Windows? I installed the three mingw32 packages, but I'm not clear
>> how to actually use these to compile rvbap.dll
>>
>> Maybe someone has a Makefile-snippet somewhere and could post it.
>>     
>
> Hm, I got a bit further along with this by using the Makefile from
> Guenther's build system (which looks a bit easier to exploit than the
> huge extended Makefiles for now).
>
> Now I get this:
>
> $ CC=i586-mingw32msvc-cc make -f Makefile.mingw rvbap.dll 
> i586-mingw32msvc-cc -mms-bitfields -Wall -W -Wshadow -Wstrict-prototypes -Wno-unused -Wno-parentheses -Wno-switch -O3 -march=i686 -mfpmath=sse -msse -DPD -DNT -D'drand48()=((double)rand()/RAND_MAX)' -D'srand48(n)=srand((n))' -D'O_NONBLOCK=1'  -I. -I.. -I../../pd/src -IC:/msys/1.0/include \
>  -o "rvbap.o" -c "rvbap.c"
> i586-mingw32msvc-cc -shared -LC:/msys/1.0/lib -L../../pd/bin -lpd -o "rvbap.dll" "rvbap.o" \
>         `test -f rvbap.libs && cat rvbap.libs` \
>         `test -f rvbap.libs && cat rvbap.libs` 
> /usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/bin/ld: cannot find -lpd
> collect2: ld returned 1 exit status
> make: *** [rvbap.dll] Error 1
>
>
> Oops, do I read this correctly, that on Windows (or *for* Windows) I need to
> have some kind of pd.dll to compile an external? And that means, I need to
> cross-compile Pd first? 
>   
(I thought libc was included by default with gcc, you didn't need -lc). 
You need pd.lib, which is in pd/bin. If you just take Miller's pd for 
Windows it will be inside. The thing I'm still not clear on is if you 
can use that pd.lib, which was compiled with MSVC, with MinGW...
I still haven't got MinGW set up to compile pd. It was a lot easier to 
set up MSVC, but I'm not cross-compiling.

> Now this sounds like a much bigger task. My first try failed at m_sched.c,
> which is not finding pthread.h
>
> I configured Pd with "./configure --host=i586-mingw32msvc --target=i586-mingw32msvc".
>
> As the clock is ticking for me, I would be really thankful if someone with a
> working Windows-compilation-setup could compile rvbap.dll for me. I would offer
> a really big beer for this, if I can get a hold of rvbap.dll before tomorrow,
> tuesday, 15:00 GMT+1. ;)
>   
I could do it for you with MSVC, but as I said, I don't know if it will 
work.

Martin





More information about the Pd-dev mailing list