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

I don't get these warnings:
PLJava.c: In function `main': PLJava.c:173: warning: control reaches end of non-void function PLJava.c:173:13: warning: no newline at end of file
Do you have a 'main' function in PLJava.c ? Where on earth did it come from ?

PLJava.c is a file that shipped with the PLJava-0.04 source. My copy of it definitely has no function named 'main', and there is definitely a newline at the end of the file. If we get those 2 things sorted out it might build. You can see what PLJava.c should look like at http://cpansearch.perl.org/src/GMPASSOS/PLJava-0.04/PLJava.c.

Cheers,
Rob

Replies are listed 'Best First'.
Re^8: problem installing PLJava on Windows Vista
by RASSyndrome (Novice) on Jun 16, 2009 at 06:43 UTC

    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'
      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'