Compile jogl in Windows

Source: Internet
Author: User

Basic System Requirements:
Windows/x86 (32-bit currently, but 64-bit is known to work)

    • Windows 2000 or later
    • Microsoft Visual C ++ 6.0 or later, or mingw Compilers
    • Sun JDK 1.4.2 or later
  1. InstallJDK:
    To compile jogl, JDK 1.4.2 or later is required. JDK 1.6.0 is installed on the system. Note that the environment variable java_home must be set. You can set it in the "environment variable" dialog box, or enter SET java_home = jdk_home_path in cmd, the jdk_home_path here is the JDK root directory.
  2. Install ant:
    SlaveThe http://ant.apache.org downloads and decompress ant, and then adds its bin/directory to the path in the environment variable.
  3. InstallAnlr:
    Download from the http://www.antlr.org and unzip anlr, which is used to parse C when compiling gluegenCodeIn fact, only the anlr. jar file is required. It should be noted that I used the latest 3.0.1 version on the network during the initial installation, but I always reported anlr errors during the compilation of gluegen, it is not until you replace anlr with version 2.7.2 that the compilation process can be successful.
  4. RemoveClasspath environment variables:
    To ensure that the jogl compilation process is not affected by the existing environment variables, you need to set the content of class_path to null.
  5. Check the code directory:
    Jogl uses gluegen to automatically generate most of the jogl or JNI code. Therefore, the jogl/and gluegen/subdirectories must be in the same path.
  6. Copy and edit gluegen. properties:
    In the Code directoryGluegen/Make/gluegen. Properties Copy to the root directory of the user, usually in C:/Documents and Settings/username, and change the anlr directory in the file to anlr. jar directory. In my system, this directory is anlr. jar = C:/Java/antlr-2.7.2/anlr. jar
  7. Copy and editJogl. properties:
    In the Code directoryGluegen/Make/Make/jogl. Properties Copy to the root directory of the user, usually in C:/Documents and Settings/username. There are two items in the file that may need to be modified:
    • Compiler: vc6, vc7, vc8, and mingw can be used.
    • Cg library path: Of course, you must first install the cg sdk. When compiling, CG 1.5 is used. You can download it from http://developer.nvidia.com/object/cg_toolkit.html.
  8. Compile the source code tree:
    Enter the make subdirectory of the project directory from the command line CMD and enter the "ant" command to compile gluegen and jogl. To add the CG compilation, use the command "Ant-djogl. CG = 1 ".

As for the steps to verify the compilation effect in the references, I will not talk about it here.

References:
1. "How to Build the jogl OpenGL binding for Java", why? REV = Head & Content-Type = text/html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.