in reply to Re^7: problem installing PLJava on Windows Vista
in thread problem installing PLJava on Windows Vista

Ough, yeah, I put that there 'cause when I didn't it complained that it couldn't find a main (I think) ...

I took the main() out and ran it through and now the output ends with

PLJava.o(.text+0x73f):PLJava.c: undefined reference to `Perl_get_conte +xt' PLJava.o(.text+0x760):PLJava.c: undefined reference to `Perl_newXS' C:\cygnus\cygwin-b20\H-i586-cygwin32\bin\..\lib\gcc-lib\i586-cygwin32\ +egcs-2.91. 57\..\..\..\..\i586-cygwin32\lib/libcygwin.a(libcmain.o): In function +`main': /home/noer/src/b20/comp-tools/devo/winsup/libcmain.cc:38: undefined re +ference to `WinMain@16' collect2: ld returned 1 exit status dmake: Error code 129, while making 'PLJava.dll'

Replies are listed 'Best First'.
Re^9: problem installing PLJava on Windows Vista
by syphilis (Archbishop) on Jun 16, 2009 at 07:32 UTC
    We need to make sure there's a newline at the end of PLJava.c, too.
    And we need to get rid of that cygwin stuff - we're using MinGW, not cygwin. Whatever it is that you've done to introduce Cygwin into the mix needs to be undone - if you haven't done anything to cause that, then it must just be that Cygwin needs to be removed from your path.

    Once that's done, start from scratch with a fresh install, and see how far that gets us. All we need for the 'dmake' phase to work is a path that includes mingw/bin, perl/bin, and the directory that contains 'dmake.exe' - and we also need those 3 Java environment variables set (which you've apparently already done).

    Cheers,
    Rob
      Like I said, I tried a bunch of different stuff before posting here... This is what it looks like without Cygwin in the path.
      C:\Users\Name\Documents\Downloads\PLJava-0.04>perl makefile.pl Set up gcc environment - 3.4.5 (mingw-vista special r3) Writing Makefile for PLJava C:\Users\Name\Documents\Downloads\PLJava-0.04>dmake gcc -c -I"C:\PROGRA~1\Java\jdk1.5.0\include" -I"C:\PROGRA~1\Java\jdk1. +5.0\includ e/win32" -Wall -Wno-comments -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT +-DHAVE_DES _FCRYPT -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONT +EXT -DPERL _IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -DHASATTRIBUTE -fno-s +trict-alia sing -mms-bitfields -I"C:\Perl\lib\CORE" PLJava.c PLJava.c: In function `PLJava_eval': PLJava.c:81: warning: unused variable `my_perl' PLJava.c: In function `PLJava_eval_sv': PLJava.c:95: warning: unused variable `my_perl' PLJava.c: In function `PLJava_error': PLJava.c:115: warning: unused variable `my_perl' gcc -c -I"C:\PROGRA~1\Java\jdk1.5.0\include" -I"C:\PROGRA~1\Java\jdk1. +5.0\includ e/win32" -Wall -Wno-comments -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT +-DHAVE_DES _FCRYPT -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONT +EXT -DPERL _IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -DHASATTRIBUTE -fno-s +trict-alia sing -mms-bitfields -I"C:\Perl\lib\CORE" PLJava_wrap.c PLJava_wrap.c:39: warning: 'SWIG_JavaThrowException' defined but not u +sed C:\PROGRA~1\Java\jdk1.5.0\bin\javac -d ./ *.java g++ PLJava.o PLJava_wrap.o -s -L"C:\Perl\lib\CORE" C:\Perl\lib\CORE +\perl510.l ib C:\MinGW\lib\libkernel32.a C:\MinGW\lib\libuser32.a C:\MinGW\lib\li +bgdi32.a C :\MinGW\lib\libwinspool.a C:\MinGW\lib\libcomdlg32.a C:\MinGW\lib\liba +dvapi32.a C:\MinGW\lib\libshell32.a C:\MinGW\lib\libole32.a C:\MinGW\lib\libolea +ut32.a C:\ MinGW\lib\libnetapi32.a C:\MinGW\lib\libuuid.a C:\MinGW\lib\libws2_32. +a C:\MinGW \lib\libmpr.a C:\MinGW\lib\libwinmm.a C:\MinGW\lib\libversion.a C:\Min +GW\lib\lib odbc32.a C:\MinGW\lib\libodbccp32.a C:\MinGW\lib\libmsvcrt.a -shared - +dll -o PLJ ava.dll 'g++' is not recognized as an internal or external command, operable program or batch file. dmake: Error code 129, while making 'PLJava.dll' C:\Users\Name\Documents\Downloads\PLJava-0.04>

      Update: Eugh, well, there's the problem, then. I updated MinGW to include g++ and now I get what you had before where dmake runs with no errors but dmake test fails:

      C:\Users\Name\Documents\Downloads\PLJava-0.04>dmake test C:\PROGRA~1\Java\jdk1.5.0\bin\java test PLJava - Native code library failed to load. See the chapter on Dynami +c Linking Problems in the SWIG Java documentation for help. java.lang.UnsatisfiedLinkError: PLJava_start dmake: Error code 129, while making 'test'
        Well ... I guess that's progress, at least :-)
        Incidentally (for future reference), assuming you have ActivePerl, the easiest way to install both dmake and MinGW is to simply ppm install MinGW
        That will give you all you need.

        The 'dmake test' error has me baffled. Afaict, 'PLJava_start' is simply a function in PLJava.c, and I don't understand what java.lang.UnsatisfiedLinkError: PLJava_start is supposed to tell me.

        As recommended by the test output, I've read "the Chapter on Dynamic Linking" in "the SWIG Java documentation for help" ... but it didn't. That documentation can be viewed online. If anyone has ideas on what to do at this point, then please share. (I don't mind trying to solve a good puzzle, but I'm not a java person at all.)

        Cheers,
        Rob