Nick Glencross wrote:
My understand is that on Windows DLLs must be self-contained and cannot
have unreferenced symbols, and so I've linked against libparrot.so which
of course pulls in much of its code. I see this also being done in the
MSWin32 case...
Sorry, I typed libparrot.so when what I really meant was libparrot.a.
I thought I'd also include the changes that I've made for cygwin as I've
reordered the link line so that libraries (in particular libgdbm) are
nearer the end of the line. [I'll submit it offically when I've actually
got more things working!]
Nick
Index: dynclasses_pl.in
===================================================================
--- dynclasses_pl.in (revision 8298)
+++ dynclasses_pl.in (working copy)
@@ -46,6 +46,12 @@
$LD_LOAD_FLAGS =~ s/(-def:)/$extraLibs $1..\\/;
}
+# Here comes some stuff for Cygwin
+if ($^O eq 'cygwin') {
+ $LD_LOAD_FLAGS .= ' ../src/parrot_config.o';
+ $LIBPARROT = qq[-L../blib/lib -lparrot];
+}
+
# PMC2C Config
our $PMC2C = "$PERL $PATHQUOTE" .
q[${build_dir}${slash}build_tools${slash}pmc2c.pl] . $PATHQUOTE;
@@ -72,11 +78,12 @@
}
return
- "$LD $LDFLAGS $LD_LOAD_FLAGS $liblist $PATHQUOTE$LIBPARROT$PATHQUOTE ".
- "${ld_out}" . $target . " " .
- join(" ", map {"$PATHQUOTE$_$PATHQUOTE"} @$sources);
+ "$LD $LDFLAGS $LD_LOAD_FLAGS -o $target " .
+ join(" ", map {"$PATHQUOTE$_$PATHQUOTE"} @$sources) .
+ " $PATHQUOTE$LIBPARROT$PATHQUOTE $liblist";
}
+
our $NOW = time();
################### MAIN PROGRAM ################