Tassilo Parseval <[EMAIL PROTECTED]> writes: >Hi everyone, > >While trying to port one of my XS-modules to Win32 (not cygwin, but >native Win32 using VisualC) the linker finally bombs out with an >unresolved external symbol _PerlIO_exportFILE. As some #ifdef tests >have shown, a number of macros (or perhaps all of them) as described >under "Co-existence with stdio" in perlapio.pod are undefined. > >So how would I go about converting the macro > >#define sv_to_file(sv) (PerlIO_exportFILE(IoIFP(sv_2io(sv)), NULL)) > >to something Windows would understand? I would be using >PerlIO_fileno() instead but as far as I know there's no way to gain a FILE >pointer from a file-descriptor (or else correct me) and the library wrapped >by this XS explicitely needs a FILE*. The whole thing is supposed to >eventually work with ActiveState's Perl.
If I recall correctly ActiveState perl is still perl5.6.? and so does not (really) have PerlIO - that is to say a PerlIO * _is_ a FILE *. However in such a system you are supposed to have PerlIO_exportFILE as a #define something like #define PerlIO_exportFILE(f,n) (f) You probably need to #define something else _before_ including perl.h and hence perlio.h and perlstdio.h to get FILE * visible. I don't have an perl5.6 source base to hand to check what that is but from memory it was something like: #define PERLIO_NOT_STDIO 0 #include <perl.h> > >Thanks for any insight, >Tassilo -- Nick Ing-Simmons http://www.ni-s.u-net.com/
