[PD-dev] windows compiling/linking problem

Georg Holzmann grhPD at gmx.at
Wed Nov 16 12:17:27 CET 2005


Hallo devs!

I just "ported" the threaded soundfiler from Tim to main pd and as usual 
everything works on linux, but I tried now (hard) two days to make it 
work on win ... and I really don't know whats all about ...
(tried on MinGW and msvc)

anyway, here is the problem:

1)
the soundfiler uses open_soundfile from d_soundfile.c to open a file.
this function is not part of the public interface of pd - in linux I can 
forward declare it and I can use it - in windows I always get an 
unresolved external ...
... is there any way to link it so that I can use this in win like in 
linux ?

2)
So I simply also implemented this function in my external (because of 
the unresolved external), but it really BEHAVES DIFFERENT !
I don't know why, it compiles fine, no warning etc. (with MinGW + msvc) 
- but I always get a -1 returned from
int bytesread = read(fd, buf, READHDRSIZE);
  read of <io.h> (same as in d_soundfile line 219) ??
(and it's no threading issue, because I simply copied the soundfiler 
code for debugging ...)

I really tried all different defines and link against different libs 
(like in the makefile of pd) ... but I have not much experience with 
windows compiling/linking ...

if someone wants to look into the code (especially into the windows 
makefiles): http://grh.mur.at/threadlib.tar.gz


Thanks,
LG
Georg




More information about the Pd-dev mailing list