On Friday 22 December 2006 11:08, Ron Blaschke wrote:

> I have managed to build Parrot::Embed on Windows/VC8, and judging from
> the test output it works.  There are two warnings, but I guess those are
> no problem?
>
>     $ ./Build test
>     t\interp....ok 1/31Parrot VM: Can't stat no file here, code 2.
>     error:imcc:syntax error, unexpected IDENTIFIER
>             in file 'EVAL_2' line 1
>     t\interp....ok
>     All tests successful.
>     Files=1, Tests=31,  0 wallclock secs ( 0.00 cusr +  0.00 csys =
>      0.00 CPU)

Right.  Those should be trappable from the embedding interface, but they 
aren't.

> There are three steps necessary (four using VC8).
>
> 1) Two additional functions need to be exported.
>     Parrot_register_pmc
>     Parrot_unregister_pmc

In some .def file somewhere, or marked somehow in the source code?

> 2) Change the compiler and linker flags.
>
> 3) Add the path to parrot.dll to Path, so it can be found during (test)
> execution.

That's tough on all platforms.  Is it a simple case of adding ../../blib/lib 
to $ENV{PATH} before executing the tests?

> Step 2 is the hard part, and I'd like to ask for some advice.  The flags
> seem to come from F<parrot.pc>, generated from the input file
> F<config/gen/makefiles/parrot.pc.in>.  The relevant entries are:
>
>     Libs: -L${libdir} -lparrot
>     Cflags: -I${includedir}
>
> The C<Cflags> seem to be added correctly in Module::Build (version
> 0.2805) to the C<extra_compiler_flags>, but they don't get passed to the
> compiler.  I needed to change C<incpath> for this.  This seems to be an
> issue with Module::Build, but I need to double check this.

Is C<incpath> a separate M::B option for Win32?

> Second, C<Libs> is not right for Visual C++ (but added to
> C<extra_linker_flags> and passed to the linker.)
>
> F<config/gen/makefiles/parrot.pc.in> says:
>
>     Libs: -L${libdir} -lparrot @icu_shared@ @libs@
>
> Visual C++ needs:
>
>     ${libdir}/libparrot.lib @icu_shared@ @libs@
> or
>     /LIBPATH:${libdir} libparrot.lib @icu_shared@ @libs@
>
> Any recommended way to get there?


Does pkg-config work on Windows?  If not, modifying that file is rather moot, 
and Parrot::Embed can work another way.  Another option is to use 
Parrot::Config, if that'll be available and installed.  That might be a 
better option.

I'm open to ideas.

-- c

Reply via email to