in reply to Re^3: Installing Javascript.pm on XP
in thread Installing Javascript.pm on XP

The MinGW was in the "Mozilla Build 1.14" package that I needed to build Spidermonkey. The package also included Perl v 5.6.1, so when I tried to run Makefile.pl in MinGW, it would say that I needed v5.8. I figured this wasn't a big deal though b/c I wanted to install Javascript.pm into the strawberry folder anyway. I guess that little note was irrelevant.

perl -v in MinGW returns 5.6.1
perl -v in the windows command line says 5.10.0

Looking at makefile.pl, it creates a JavaScript_Env.h file. It also creates a test_js.c file which is supposed to do a small compile to see if libs and headers can be located. It then outputs a gcc command to the command line. I think the gcc command is causing a problem. Here is what the gcc command I'm sending looks like:

gcc -LC:\strawberry\js\src\WINNT5.1_OPT.OBJ -ljs32 -o C:\DOCUME~1\Stev +e\LOCALS~1\Temp\b4to8dFiQI -IC:\strawberry\js\src test_js.c

dunno if that helps.

Replies are listed 'Best First'.
Re^5: Installing Javascript.pm on XP
by syphilis (Archbishop) on Aug 06, 2009 at 06:55 UTC
    gcc -LC:\strawberry\js\src\WINNT5.1_OPT.OBJ -ljs32 -o C:\DOCUME~1\Steve\LOCALS~1\Temp\b4to8dFiQI -IC:\strawberry\js\src test_js.c

    Should not produce the error you're getting - assuming that the import library identified by '-ljs32' exists in C:\strawberry\js\src\WINNT5.1_OPT.OBJ. What filename(s) matching /js32/ do you find in that directory ?

    Cheers,
    Rob
      I have js32.dll, js32.dll.manifest, js32.exp, js32.lib.
        I have js32.dll, js32.dll.manifest, js32.exp, js32.lib.

        It would be 'js32.lib' that's going to resolve the symbol. And '-LC:\strawberry\js\src\WINNT5.1_OPT.OBJ -ljs32' should be sufficient to find it.
        Try creating a copy of that file (in the same folder) named 'libjs32.a' and see if that fixes the problem. (I don't see why that should make any difference.)
        If that doesn't fix it then all I can think of is that the '-LC:\strawberry\js\src\WINNT5.1_OPT.OBJ -ljs32' needs to be moved to the *end* of the command. (I don't see why that should make any difference, either.) It's all rather bizarre.

        Note also that C:\strawberry\js\src\WINNT5.1_OPT.OBJ needs to be in your path, so that js32.dll can be found at runtime.

        Cheers,
        Rob