Menu

failed when compiled JWX! in Win32 environmen

Joe zh
2006-12-15
2013-04-26
  • Joe zh

    Joe zh - 2006-12-15

    C:\test\jwx-0.0.2\sources>ANT
    Buildfile: build.xml

    compile:

    init:

    native:
         [exec] g++ -c -o .\native\jwx_core_core_app.o -DHAVE_W32API_H  -D__WXDEBUG
    _ -D__WXMSW__ -Ic:\test\wxW\lib\gcc_lib\mswd -Ic:\test\wxW\include -IC:\Program
    Files\Java\jre1.5.0_09\include -IC:\Program Files\Java\jre1.5.0_09\include\win3
       -mthreads -I.\swig -I.\swig\cpp -I. -I..\include   -MT.\native\jwx_core_core
    app.o -MF.\native\jwx_core_core_app.o.d -MD swig/core_app.cpp
         [exec] In file included from ../include/jwx/jwx.h:31,
         [exec]                  from swig/core_app.cpp:13:
         [exec] ../include/jwx/utils.h: In function `__jobjectArray* wx2j_array_str
    ng(JNIEnv*, const wxArrayString&)':
         [exec] ../include/jwx/utils.h:127: error: invalid conversion from `__jarra
    *' to `__jobjectArray*'
         [exec] g++: Files\Java\jre1.5.0_09\include: No such file or directory
         [exec] g++: Files\Java\jre1.5.0_09\include\win32: No such file or director

         [exec] mingw32-make: *** [.\native\jwx_core_core_app.o] Error 1

    BUILD FAILED
    C:\test\jwx-0.0.2\sources\build.xml:40: The following error occurred while exec
    ting this line:
    C:\test\jwx-0.0.2\sources\build.xml:33: The following error occurred while exec
    ting this line:
    C:\test\jwx-0.0.2\sources\module.xml:22: exec returned: 2

    Total time: 8 seconds
    C:\test\jwx-0.0.2\sources>

    help me?

     
    • Amit Mendapara

      Amit Mendapara - 2006-12-17

      You need JDK not JRE. Please install JDK and set JAVA_HOME pointing to your JDK installation directory.

      If you don't want to alter your exising JAVA_HOME path, do this:

      ant -Dmake.args=JAVA_HOME="C:\Program Files\jdk-1.5.0_09\"

       
    • HLim

      HLim - 2007-02-02

      Hi everybody,

      I would like to know the difference between your current project and wx4j. I am very interested in having such a library wrapper but i am wondering if this new project would not be at a better stage if the previous source of wx4j is used.

      Thank you for your answer.
      Regards
      HLim

       
    • Amit Mendapara

      Amit Mendapara - 2007-02-08

      Hi

      Not much, but wx4j seems to be a straight forward conversion of wxWidgets API, while I'm trying to make jwx! similar to wxPython/wx.NET. I am sure you have read the introduction of jwx! and its main goals.

      I am realy not much familiar with wx4j, but I promise, you will get better then that...

      Thank you for your interest in jwx!

      - Amit Mendapara

       
    • HLim

      HLim - 2007-02-08

      Hi Amit,

      There are missing features in wx4j and the wxwidgets library used is pretty old. I am using it for evaluation right now and I have reached several limitations already...even without being an expert of wxwidgets.

      I hope that jwx is much greater. I am sure it will be if you already know that wx4j exists.

      I am very interested in having the binaries (fed up of setting my environment for compilation) if you could provide that for downloading. Could you also tell me whether jwx is at an acceptable stage for building some apps ?

      Thank you in advance for your answer.
      HLim 

       
    • Amit Mendapara

      Amit Mendapara - 2007-02-09

      Hi,

      Currently, I am working on Linux platform and don't know whether it works on Win32 platform. Though I have successfully cross-compiled it with MinGW cross-compiler on my Debian system, I am not sure whether the resulting binary could work or not.

      If you are using Linux system, it's too easy to compile jwx! from the ready to build source archives.

      jwx! is still in alpha stage of development and as I have mentioned in the initial docs, you should not expect backward compatibilities among the initial alpha releases. So if you are serious, try developing some sample applications and let me know about your experiences/expectations/suggestions.

      Thank you
      Amit G Mendapara

       
  • Jesus Ramirez

    Jesus Ramirez - 2011-03-16

    hi
    im new in the use of jwx, i have to conect wxwidgets with java and java with imagemagick to create an aplication for image processing.  first i follow the steps indicated in the JWX website but i cant run the example, could you helpme to solve the problem please.

    this are the speps that  Follow

    get
    * jdk >= 1.6.0_23
      * ant >= 1.8.2
      * MinGW (GCC >= 3.4)
      * wxWidgets 2.8.11

    edit build.properties found in sources subdirectory as…

      make.exe=mingw32-make
      make.file=makefile.mingw
      jni.platform=win32

    edit config.mingw appropriately

    Do the followings:

      > set JAVA_HOME=c:\program fiiles\java\jdk1.6.0_23
      > set ANT_HOME=c:\ant-1.8.2
      > set WXWIN=c:\wxWidgets-2.8.11
      > set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;c:\mingw\bin;%PATH%

      > cd C:\jwx-0.0.2-p4\sources
      > ant

    finally

    To create jar files of compiled Java sources of each modules, do:

      > ant dist
    but nothing happens

    please helpme

     
  • Amit Mendapara

    Amit Mendapara - 2011-03-16

    @hellville,

    The project is no longer active and there is no plan to start it again. However, if some of you are really interested then I will be happy to handing over the project.

    BTW, jwx! depends on wxWidget 2.6.x and won't compile with later versions (2.8, 2.9). AFAIK, it was working fine with wx-2.6 as documented. Once build you have to run the samples separably:

    cd /path/to/jwx/sources
    ant dist

    cd /path/to/jwx/samples/minimal
    ant

    Thanks

     
  • Jesus Ramirez

    Jesus Ramirez - 2011-03-23

    hi . mr_amit

    I´ve been dealing with the same versions that are in the document, but isn´t work.
    like you said, the proyect  wasn´t active, could you tell me if will be possible make the conection between java with wxwidgets?

    all my mates and I are interested in make this conection, as i had say, that is a school proyect. So you think you could help us with this?
    please we need help.
    thanks

     
  • Amit Mendapara

    Amit Mendapara - 2011-03-23

    hellville,

    I am not sure why it's not working at your side but last time when I tried jwx! with wxWidgets 2.6 on my old Ubuntu system, it was working fine.

    BTW, you can definitely make the communication between Java and wxWidgets using JNI API (Java Native Interface). The jwx! itself uses JNI to talk with wxWidgets.

    Thanks

     
  • Charlie Hernandez

    hi everybody.

    i have one question about the instructions in the BUILD.txt and is, the line
    make.args= what do i put here?

    because i had a error when i execute the last instruction (ant)
    C:\jwx\sources>ant
    Buildfile: C:\jwx\sources\build.xml

    compile:

    init:

    native:
          Usage: windres  
           The options are:
            -i -input=<file>            Name input file
            -o -output=<file>           Name output file
            -J -input-format=<format>   Specify input format
            -O -output-format=<format>  Specify output format
            -F -target=<target>         Specify COFF target
               -preprocessor=<program>  Program to use to preprocess rc file
            -I -include-dir=<dir>       Include directory when preprocessing
    rc file
            -D -define <sym>    Define SYM when preprocessing rc file

            -U -undefine <sym>          Undefine SYM when preprocessing rc fi
    le
            -v -verbose                 Verbose - tells you what it's doing
            -c -codepage=<codepage>     Specify default codepage
            -l -language=<val>          Set language when reading rc file
               -use-temp-file           Use a temporary file instead of popen
    to read
                   windres -use-temp-file -i../include/jwx/version.rc -o.\nat
    ive\jwx_core_version_rc.o -define HAVE_W32API_H  -define __WXDEBUG_
               the preprocessor output
               -no-use-temp-file        Use popen (default)
            -r                           Ignored for compatibility with rc
            @<file>                      Read options from <file>
            -h -help                    Print this help message
            -V -version                 Print version information
          FORMAT is one of rc, res, or coff, and is deduced from the file name

          extension if not specified.  A single file name is an input file.
          No input-file is stdin, default rc.  No output-file is stdout, defau
    lt rc.
          windres: supported targets: pe-i386 pei-i386 elf32-i386 elf32-little
    elf32-big srec symbolsrec verilog tekhex binary ihex
          mingw32-make: ***  Error 1
          _ -define __WXMSW__ -include-dir C:\wxWidgets-2.6.4\lib\gcc_lib\ms
    wd -include-dir C:\wxWidgets-2.6.4/include -include-dir C:\Program Files (x86)
    \Java\jdk1.6.0_22/include -include-dir C:\Program Files (x86)\Java\jdk1.6.0_22/
    include/win32   -include-dir . -include-dir ..\include

    BUILD FAILED
    C:\jwx\sources\build.xml:40: The following error occurred while executing this l
    ine:
    C:\jwx\sources\build.xml:33: The following error occurred while executing this l
    ine:
    C:\jwx\sources\module.xml:22: exec returned: 2

    Total time: 1 second

    i trying to running in win32 env. what i doing wrong?

    Thanks.

     
  • Erika Rodríguez

    hi all =)
    i know Mr. Amit is no longer working on jwx .-. but i really need to use it for a project…my problem is, i followed the build instructions, but when i try to type "ant" i get this error
    C:\Documents and Settings\Shinigami\Mis documentos\jwx-0.0.2-p4\sources>ant
    Buildfile: C:\Documents and Settings\Shinigami\Mis documentos\jwx-0.0.2-p4\sourc
    es\build.xml

    compile:

    init:

    native:

    BUILD FAILED
    C:\Documents and Settings\Shinigami\Mis documentos\jwx-0.0.2-p4\sources\build.xm
    l:40: The following error occurred while executing this line:
    C:\Documents and Settings\Shinigami\Mis documentos\jwx-0.0.2-p4\sources\build.xm
    l:33: The following error occurred while executing this line:
    C:\Documents and Settings\Shinigami\Mis documentos\jwx-0.0.2-p4\sources\module.x
    ml:22: Execute failed: java.io.IOException: Cannot run program "make" (in direct
    ory "C:\Documents and Settings\Shinigami\Mis documentos\jwx-0.0.2-p4\sources\cor
    e"): CreateProcess error=2, El sistema no puede hallar el archivo especificado
            at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
            at java.lang.Runtime.exec(Runtime.java:593)
            at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Exec
    ute.java:862)
            at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:481)
            at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
            at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:631)
            at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
            at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)
            at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
            at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
    a:106)
            at org.apache.tools.ant.Task.perform(Task.java:348)
            at org.apache.tools.ant.Target.execute(Target.java:390)
            at org.apache.tools.ant.Target.performTasks(Target.java:411)
            at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
            at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(Single
    CheckExecutor.java:38)
            at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
            at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
            at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:302)
            at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:221)
            at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
    a:106)
            at org.apache.tools.ant.Task.perform(Task.java:348)
            at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
            at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
    a:106)
            at org.apache.tools.ant.Task.perform(Task.java:348)
            at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.jav
    a:398)
            at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
    a:106)
            at org.apache.tools.ant.Task.perform(Task.java:348)
            at org.apache.tools.ant.Target.execute(Target.java:390)
            at org.apache.tools.ant.Target.performTasks(Target.java:411)
            at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
            at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
            at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
    cutor.java:41)
            at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
            at org.apache.tools.ant.Main.runBuild(Main.java:809)
            at org.apache.tools.ant.Main.startAnt(Main.java:217)
            at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
            at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
    Caused by: java.io.IOException: CreateProcess error=2, El sistema no puede halla
    r el archivo especificado
            at java.lang.ProcessImpl.create(Native Method)
            at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
            at java.lang.ProcessImpl.start(ProcessImpl.java:30)
            at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
            … 54 more

    pretty long i know
    btw, the environment variables are set as follow
    ANT_HOME:C:\apache-ant-1.8.2
    JAVA_HOME:C:\Archivos de programa\Java\jdk1.6.0_21
    PATH: C:\apache-ant-1.8.2\bin;C:\wxWidgets-2.6.3\bin;C:\Archivos de programa\Java\jdk1.6.0_21\bin
    WXWIN:C:\wxWidgets-2.6.3

    also, I'm working on Windows XP 32 bit…i really don't know what to do anymore u.u i tried reading this topic and other forums, but i've ran out of ideas…if you could please help me, i'll be very grateful

     

Log in to post a comment.