Menu

Building Ogre4J 1.7.3 with xbig

Help
2011-07-31
2013-04-25
  • DarkLightning7

    DarkLightning7 - 2011-07-31

    I am currently attempting to set up xbig so that I may build the majority of the jni bindings with it for Ogre.  Since the xbig project does not have a forum I figured I would ask here.  I am almost set up with xbig but I received an error while compiling.  If I could get help with this error that would be great.  I will provide my finished product to the community once I debug it.

    The error I am having is during the ant build of xbig.  Here it is:

    [C:\XBiG\tests\t1>ant -lib ../../src/ant/jar/
    Buildfile: C:\XBiG\tests\t1\build.xml
    compile-base-lib:
    config.base.init:
    java-pre-init:
    java-include-linux-init:
    java-include-windows-init:
         [echo] WINDOWS FOUND
    java-include-init:
    config.java.init:
    util.java.init:
    init:
    all:
         [echo] library name: xbig-base
         [echo] source dir:   C:\XBiG\src\java/src/java
         [echo] classdir:     C:\XBiG\src\java/build/java/class
         [echo] jar file:     C:\XBiG\src\java/build/java/jar/xbig-base.jar
        [javac] C:\XBiG\src\ant\util\util_java.xml:56: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    config.base.init:
    cpp-pre-init:
    cpp-release-init:
    cpp-debug-init:
    cpp-win-debug-init:
    cpp-win-release-init:
    cpp-win-init:
    cpp-linux-debug-init:
    cpp-linux-release-init:
    cpp-linux-init:
    config.cpp.init:
    util.cpp.init:
    java-pre-init:
    java-include-linux-init:
    java-include-windows-init:
         [echo] WINDOWS FOUND
    java-include-init:
    config.java.init:
    util.java.init:
    init:
    all:
         [echo] create shared library cpp2j-base in C:\XBiG\src\c/build/win64/g++/release/shared with sources in C:\XBiG\src\c/src/lib
           [cc] Starting dependency analysis for 22 files.
           [cc] 22 files are up to date.
           [cc] 0 files to be recompiled from dependency analysis.
           [cc] 0 total files to be compiled.
         [exec] Execute failed: java.io.IOException: Cannot run program "mt.exe" (in directory "C:\XBiG\src\c\build\win64\g++\release\shared"): CreateProcess error=2, The system cannot find the file speci
    fied
    config.base.init:
    cpp-pre-init:
    cpp-release-init:
    cpp-debug-init:
    cpp-win-debug-init:
    cpp-win-release-init:
    cpp-win-init:
    cpp-linux-debug-init:
    cpp-linux-release-init:
    cpp-linux-init:
    config.cpp.init:
    util.cpp.init:
    java-pre-init:
    java-include-linux-init:
    java-include-windows-init:
         [echo] WINDOWS FOUND
    java-include-init:
    config.java.init:
    util.java.init:
    config.doxygen.init:
    util.doxygen.init:
    config.xsl.init:
    util.xsl.init:
    cpp2j.init:
    init:
    compile-lib-base:
         [echo] create shared library t1 in C:\XBiG\tests\t1/build/win64/g++/release/shared with sources in C:\XBiG\tests\t1/src/lib
           [cc] Starting dependency analysis for 1 files.
           [cc] 1 files are up to date.
           [cc] 0 files to be recompiled from dependency analysis.
           [cc] 0 total files to be compiled.
         [exec] Execute failed: java.io.IOException: Cannot run program "mt.exe" (in directory "C:\XBiG\tests\t1\build\win64\g++\release\shared"): CreateProcess error=2, The system cannot find the file sp
    ecified
         [echo] create shared test program simple in C:\XBiG\tests\t1/build/win64/g++/release/shared
           [cc] Starting dependency analysis for 1 files.
           [cc] 1 files are up to date.
           [cc] 0 files to be recompiled from dependency analysis.
           [cc] 0 total files to be compiled.
           [cc] Starting link
           [cc] c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -lt1
           [cc] collect2: ld returned 1 exit status
    BUILD FAILED
    C:\XBiG\tests\t1\build.xml:46: The following error occurred while executing this line:
    C:\XBiG\src\ant\util\util_cpp.xml:162: The following error occurred while executing this line:
    C:\XBiG\src\ant\util\util_cpp.xml:139: The following error occurred while executing this line:
    C:\XBiG\src\ant\util\util_cpp.xml:49: gcc failed with return code 1
    Total time: 4 seconds
    C:\XBiG\tests\t1>/code]
    Thanks.
    
     
  • Christoph Nenning

    Execute failed: java.io.IOException: Cannot run program "mt.exe"

    mt.exe comes with VisualStudio 2005 (and later versions) it is required to embed a XML-Manifest in .dll and .exe files. As you build with MinGW you can ignore that.

    c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot find -lt1

    That is a more serious problem. t1 is the dll build through the first test case. For that lib a JNI binding is generated, compiled and tested with jUnit.
    It seems that the ant script is not working with MinGW.
    These are you options:
    - fix the ant script
    - use another compiler (like Visual Studio express)
    - use another operating system (gcc is supported under Linux and OSX)

     
  • DarkLightning7

    DarkLightning7 - 2011-08-26

    Sorry it has taken me so long to get back to this project. A lot has happened in the last few weeks.

    I have successfully built xbig but I can't find anything on how to use it to generate c++ bindings.  If someone could point me to some instructions or provide a short summary on usage and setting up projects I think I can get started.

    Thanks.

     
  • DarkLightning7

    DarkLightning7 - 2011-08-26

    Thanks for the help kex347 I simply switched to Linux installed the prerequisites and it built right away

     
  • Christoph Nenning

    See the ant build.xml file in xbig/tests/t1 as an example.

     

Log in to post a comment.