diff --git a/Makefile.PL b/Makefile.PL index b1b9d14..38eb314 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -17,7 +17,7 @@ my @defines; my $path_separator = ":"; if($^O eq "MSWin32") { - push @defines, "XP_PC"; + push @defines, "XP_WIN"; $path_separator = ";"; } else { push @defines, "XP_UNIX"; @@ -175,10 +175,10 @@ END_OF_SOURCE close $test_script; my $exe = tmpnam();; - my $cc = join(" ", $Config{cc}, $libs, @ccflags, "-l${lib}", "-o", $exe, (map { "-I$_" } @incs), "test_js.c"); + my $cc = join(" ", $Config{cc}, @ccflags, "-o", $exe, "test_js.c", "-I.", (map { "-I$_" } @incs), $libs, "-l${lib}" ); qx($cc); if ($?) { - print "Failed compiling test_js.c. ABORTING\n"; + print "Failed compiling test_js.c. ABORTING\n\n$cc\n"; exit 0; } unlink("test_js.c"); @@ -210,7 +210,7 @@ WriteMakefile( ABSTRACT_FROM => "lib/JavaScript.pm", # retrieve abstract from module AUTHOR => "Claes Jakobsson ", CCFLAGS => join(" ", @ccflags), - LIBS => ["$libs -l${lib}"], # e.g., "-lm" + LIBS => [":nosearch $libs -l${lib}"], # e.g., "-lm" INC => join(" ", map { "-I$_" } @incs), LICENSE => "perl", OBJECT => q/$(O_FILES)/, diff --git a/PJS_Call.c b/PJS_Call.c index 972d386..7b93f90 100644 --- a/PJS_Call.c +++ b/PJS_Call.c @@ -2,6 +2,8 @@ #include "perl.h" #include "XSUB.h" + + #include "JavaScript_Env.h" #include "PJS_Call.h" diff --git a/PJS_Class.c b/PJS_Class.c index 2cf79cb..bc9e869 100644 --- a/PJS_Class.c +++ b/PJS_Class.c @@ -2,6 +2,8 @@ #include "perl.h" #include "XSUB.h" + + #include "JavaScript_Env.h" #include "PJS_Class.h" diff --git a/PJS_Context.c b/PJS_Context.c index 5f13d9c..c272e64 100644 --- a/PJS_Context.c +++ b/PJS_Context.c @@ -2,6 +2,8 @@ #include "perl.h" #include "XSUB.h" + + #include "JavaScript_Env.h" #include "PJS_Types.h" diff --git a/PJS_Function.c b/PJS_Function.c index aefe182..91794a4 100644 --- a/PJS_Function.c +++ b/PJS_Function.c @@ -1,4 +1,4 @@ -#include "XSUB.h" + #include "JavaScript_Env.h" #include "PJS_Function.h" diff --git a/PJS_PerlArray.c b/PJS_PerlArray.c index a71484d..ddb3a4b 100644 --- a/PJS_PerlArray.c +++ b/PJS_PerlArray.c @@ -1,4 +1,4 @@ -#include "XSUB.h" + #include "JavaScript_Env.h" diff --git a/PJS_PerlHash.c b/PJS_PerlHash.c index 4074e20..a21bb91 100644 --- a/PJS_PerlHash.c +++ b/PJS_PerlHash.c @@ -1,4 +1,4 @@ -#include "XSUB.h" + #include "JavaScript_Env.h" diff --git a/PJS_PerlSub.c b/PJS_PerlSub.c index 64f276e..2612b20 100644 --- a/PJS_PerlSub.c +++ b/PJS_PerlSub.c @@ -1,4 +1,4 @@ -#include "XSUB.h" + #include "JavaScript_Env.h" diff --git a/PJS_Property.c b/PJS_Property.c index dc12cba..2406b0f 100644 --- a/PJS_Property.c +++ b/PJS_Property.c @@ -2,6 +2,8 @@ #include "perl.h" #include "XSUB.h" + + #include "JavaScript_Env.h" #include "PJS_Context.h" diff --git a/PJS_TypeConversion.c b/PJS_TypeConversion.c #### dmake dlltool --def JavaScript.def --output-exp dll.exp g++ -o blib\arch\auto\JavaScript\JavaScript.dll -Wl,--base-file -Wl,dll.base -mdll -s -L"C:\strawberry\perl\lib\CORE" -L "C:\strawberry\c\lib" JavaScript.o PJS_Call.o PJS_Class.o PJS_Context.o PJS_Exceptions.o PJS_Func tion.o PJS_PerlArray.o PJS_PerlHash.o PJS_PerlSub.o PJS_Property.o PJS_Runtime.o PJS_TypeConversion.o -Wl ,--image-base,0x19020000 C:\strawberry\perl\lib\CORE\libperl510.a -L.. -ljs -lmsvcrt -lmoldname -lkernel32 -luse r32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lver sion -lodbc32 -lodbccp32 dll.exp JavaScript.o:JavaScript.c:(.text+0x4f5): undefined reference to `_imp__PJS_CreateRuntime' JavaScript.o:JavaScript.c:(.text+0x677): undefined reference to `_imp__PJS_DestroyRuntime' JavaScript.o:JavaScript.c:(.text+0x818): undefined reference to `_imp__PJS_AddTrapHandler' JavaScript.o:JavaScript.c:(.text+0xa08): undefined reference to `_imp__PJS_RemoveTrapHandler' JavaScript.o:JavaScript.c:(.text+0xb57): undefined reference to `_imp__PJS_perl_trap_handler' JavaScript.o:JavaScript.c:(.text+0xe2c): undefined reference to `_imp__PJS_CreateContext' JavaScript.o:JavaScript.c:(.text+0x1226): undefined reference to `_imp__PJS_DestroyContext' JavaScript.o:JavaScript.c:(.text+0x1863): undefined reference to `JS_SetBranchCallback' JavaScript.o:JavaScript.c:(.text+0x191c): undefined reference to `_imp__PJS_branch_handler' JavaScript.o:JavaScript.c:(.text+0x1aba): undefined reference to `_imp__PJS_DefineFunction' JavaScript.o:JavaScript.c:(.text+0x2004): undefined reference to `_imp__PJS_bind_class' JavaScript.o:JavaScript.c:(.text+0x225e): undefined reference to `_imp__PJS_ConvertPerlToJSType' JavaScript.o:JavaScript.c:(.text+0x2ac1): undefined reference to `_imp__JSVALToSV' JavaScript.o:JavaScript.c:(.text+0x2ead): undefined reference to `_imp__PJS_call_javascript_function' JavaScript.o:JavaScript.c:(.text+0x2f08): undefined reference to `_imp__JSVALToSV' JavaScript.o:JavaScript.c:(.text+0x2fe2): undefined reference to `_imp__PJS_call_perl_method' JavaScript.o:JavaScript.c:(.text+0x3006): undefined reference to `_imp__PJS_call_perl_method' JavaScript.o:JavaScript.c:(.text+0x30a3): undefined reference to `_imp__PJS_call_perl_method' JavaScript.o:JavaScript.c:(.text+0x329a): undefined reference to `_imp__PJS_call_perl_method' JavaScript.o:JavaScript.c:(.text+0x32be): undefined reference to `_imp__PJS_call_perl_method' JavaScript.o:JavaScript.c:(.text+0x3383): undefined reference to `_imp__PJS_ConvertPerlToJSType' JavaScript.o:JavaScript.c:(.text+0x33c4): undefined reference to `_imp__PJS_ConvertPerlToJSType' JavaScript.o:JavaScript.c:(.text+0x3575): undefined reference to `_imp__PJS_call_perl_method' JavaScript.o:JavaScript.c:(.text+0x359e): undefined reference to `_imp__PJS_call_perl_method' JavaScript.o:JavaScript.c:(.text+0x35f5): undefined reference to `_imp__JSVALToSV' JavaScript.o:JavaScript.c:(.text+0x3fe2): undefined reference to `_imp__JSVALToSV' JavaScript.o:JavaScript.c:(.text+0x43a8): undefined reference to `_imp__PJS_NewPerlArray' JavaScript.o:JavaScript.c:(.text+0x4808): undefined reference to `_imp__PJS_NewPerlHash' JavaScript.o:JavaScript.c:(.text+0x4ca7): undefined reference to `_imp__PJS_free_class' JavaScript.o:JavaScript.c:(.text+0x4de7): undefined reference to `_imp__PJS_DestroyFunction' PJS_Call.o:PJS_Call.c:(.text+0x354): undefined reference to `_imp__JSVALToSV' PJS_Call.o:PJS_Call.c:(.text+0x571): undefined reference to `_imp__PJS_ConvertPerlToJSType' PJS_Call.o:PJS_Call.c:(.text+0x72e): undefined reference to `_imp__PJS_ConvertPerlToJSType' PJS_Call.o:PJS_Call.c:(.text+0x859): undefined reference to `_imp__PJS_ConvertPerlToJSType' PJS_Class.o:PJS_Class.c:(.text+0xb8): undefined reference to `_imp__PJS_DestroyFunction' PJS_Class.o:PJS_Class.c:(.text+0xca): undefined reference to `_imp__PJS_free_JSFunctionSpec' PJS_Class.o:PJS_Class.c:(.text+0xd6): undefined reference to `_imp__PJS_free_JSFunctionSpec' PJS_Class.o:PJS_Class.c:(.text+0xe8): undefined reference to `_imp__PJS_free_property' PJS_Class.o:PJS_Class.c:(.text+0xfa): undefined reference to `_imp__PJS_free_JSPropertySpec' PJS_Class.o:PJS_Class.c:(.text+0x106): undefined reference to `_imp__PJS_free_JSPropertySpec' PJS_Class.o:PJS_Class.c:(.text+0x32b): undefined reference to `_imp__PJS_GetClassByName' PJS_Class.o:PJS_Class.c:(.text+0x844): undefined reference to `_imp__PJS_invoke_perl_property_getter' PJS_Class.o:PJS_Class.c:(.text+0x84c): undefined reference to `_imp__PJS_invoke_perl_property_setter' PJS_Class.o:PJS_Class.c:(.text+0xb31): undefined reference to `_imp__PJS_invoke_perl_property_getter' PJS_Class.o:PJS_Class.c:(.text+0xb3d): undefined reference to `_imp__PJS_invoke_perl_property_setter' PJS_Class.o:PJS_Class.c:(.text+0xd67): undefined reference to `_imp__PJS_GetClassByName' PJS_Class.o:PJS_Class.c:(.text+0xe2a): undefined reference to `_imp__PJS_GetClassByName' PJS_Context.o:PJS_Context.c:(.text+0x379): undefined reference to `_imp__PJS_InitPerlArrayClass' PJS_Context.o:PJS_Context.c:(.text+0x38a): undefined reference to `_imp__PJS_InitPerlHashClass' PJS_Context.o:PJS_Context.c:(.text+0x39b): undefined reference to `_imp__PJS_InitPerlSubClass' PJS_Context.o:PJS_Context.c:(.text+0x464): undefined reference to `_imp__PJS_CreateFunction' PJS_Context.o:PJS_Context.c:(.text+0x486): undefined reference to `_imp__PJS_invoke_perl_function' PJS_Context.o:PJS_Context.c:(.text+0x561): undefined reference to `_imp__PJS_DestroyFunction' PJS_Exceptions.o:PJS_Exceptions.c:(.text+0x113): undefined reference to `_imp__JSVALToSV' PJS_Function.o:PJS_Function.c:(.text+0x85): undefined reference to `_imp__PJS_GetFunctionByName' PJS_PerlArray.o:PJS_PerlArray.c:(.text+0xe3): undefined reference to `_imp__PJS_store_class' PJS_PerlHash.o:PJS_PerlHash.c:(.text+0xe3): undefined reference to `_imp__PJS_store_class' PJS_PerlSub.o:PJS_PerlSub.c:(.text+0x160): undefined reference to `_imp__PJS_store_class' PJS_Property.o:PJS_Property.c:(.text+0x1c5): undefined reference to `_imp__PJS_GetClassByName' PJS_Property.o:PJS_Property.c:(.text+0x1e1): undefined reference to `_imp__PJS_get_property_by_id' PJS_Property.o:PJS_Property.c:(.text+0x3a5): undefined reference to `_imp__PJS_GetClassByName' PJS_Property.o:PJS_Property.c:(.text+0x3c1): undefined reference to `_imp__PJS_get_property_by_id' PJS_TypeConversion.o:PJS_TypeConversion.c:(.text+0x1b9): undefined reference to `_imp__PJS_GetClassByPackage' PJS_TypeConversion.o:PJS_TypeConversion.c:(.text+0x286): undefined reference to `_imp__PJS_call_perl_method' PJS_TypeConversion.o:PJS_TypeConversion.c:(.text+0x2ad): undefined reference to `_imp__PJS_call_perl_method' PJS_TypeConversion.o:PJS_TypeConversion.c:(.text+0x376): undefined reference to `_imp__PJS_call_perl_method' PJS_TypeConversion.o:PJS_TypeConversion.c:(.text+0x39d): undefined reference to `_imp__PJS_call_perl_method' PJS_TypeConversion.o:PJS_TypeConversion.c:(.text+0x464): undefined reference to `_imp__PJS_call_perl_method' PJS_TypeConversion.o:PJS_TypeConversion.c:(.text+0x4a2): more undefined references to `_imp__PJS_call_perl_method' follo w PJS_TypeConversion.o:PJS_TypeConversion.c:(.text+0x92a): undefined reference to `_imp__PJS_NewPerlSubObject' PJS_TypeConversion.o:PJS_TypeConversion.c:(.text+0xdba): undefined reference to `_imp__PJS_call_perl_method' PJS_TypeConversion.o:PJS_TypeConversion.c:(.text+0x13fd): undefined reference to `_imp__PJS_call_perl_method' collect2: ld returned 1 exit status dmake: Error code 129, while making 'blib\arch\auto\JavaScript\JavaScript.dll'