Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (549)
Games in Android Showcase (136)
games submitted by our members
Games in WIP (594)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Compiling odejava and ode from scratch  (Read 1401 times)
0 Members and 1 Guest are viewing this topic.
Offline lhkbob

JGO Knight

Medals: 32

« Posted 2007-11-19 00:50:18 »

I'm having terrible difficulty trying to compile ode and odejava from scratch, mostly because the instructions don't add up.  If filenames aren't exact, I'm doing this from memory, so bear with me.
Here is what I did on my Mac (osx 10.4.10):
1. Checked out odejava from odejava's cvs
2. Downloaded ode-.9 source
3. Looking at the various readmes, I put the source in compile/odejava/ode, although there was no config/user_settings to edit.
4. Ignoring this problem, I tried to compile ODE by running the configure script and then make.
   a. Couldn't get it to compile with OPCODE, compiled when I edited some include statements for GIMPACT, however even though it generated no errors, there were no libraries outputted for my use (or .o files that I could tell).  The directories it claimed to put them in didn't exist (I think they were /usr/local/lib (this one existed but had no new files in it after running make) and /usr/local/ode).

This is essentially where I gave up.  I'm just looking for up to date binaries and .jar libraries for odejava, but seemed very out of date (since 2004 for the natives).  Are there any more up-to-date packaged versions out there (preferably able to run ode .9, since that has new features that I would like).

Offline irrisor

Junior Devvie

« Reply #1 - Posted 2007-11-19 08:52:06 »

odejava-jni has build-scripts in the build folder. We are currently struggling with building universal binaries, but if you remove one of the -arch flags osx binaries should build fine. Probably you can even help out with the universal binaries?
You can use odejava-jni (HEAD) with the other odejava parts in the branch "with-odejava-jni".
Offline lhkbob

JGO Knight

Medals: 32

« Reply #2 - Posted 2007-11-19 16:09:33 »

That may have been my problem, I just checked out the odejava branch and not odejava-jni.  I'll give that a try once I have a bit more free time and I'll let you know how it went.  If I figure out how to get it working, I'd be glad to write up a more modern tutorial for mac users.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline lhkbob

JGO Knight

Medals: 32

« Reply #3 - Posted 2007-11-19 23:39:57 »

Starting from the odejava-jni branch, I've successfully been able to compile ode-0.9.  Here are some notes of what I had to change to make it work correctly:
0. Make sure XCode is installed since that gives mac the gcc compiler.
1. Can't use svn, doesn't give the configure file (sh didn't help either).  Used the snapshot release from sourceforge.
2. run ./configure --enable-release --with-trimesh=gimpact.  The other options in odejava readme caused it to fail.
3. open GIMPACT/src/gim_memory.cpp and remove the include for malloc.h (not necessary for mac os x)
4. run make
5. The .o files and libode.dylib are placed in ./ode/src even though the configure script claims they go to /usr/local/include and /usr/local/lib

That's the good news.  The bad news is that I'm stuck running swig to generate the necessary files.  I used the newest swig if it makes a difference.  To get it to not generate errors, I had to change some paths in the odejava.i file, although it confused me as to why some worked and others didn't since they all seemed to point incorrectly.  Anyway, once it ran, there were no new files placed in the generated/ folder.

Any help would be appreciated.

Offline lhkbob

JGO Knight

Medals: 32

« Reply #4 - Posted 2007-11-20 01:08:11 »

Actually swig did generate code, just once again in a place unexpected --> went to generated/org/etc instead of generated/java/org/etc
Anyway with that discovered I began trying to compile and link the odejava stuff and it made more errors.  I got around some by moving some of the opende directories so that the include statements could actually read them (this is also where I'm having trouble since I'm not familiar with gcc so I don't know the purpose or syntax for all of the flagged options).  When running these, there are thousands of errors generated from the odejava.cxx file.  Oddly enough the errors shouldn't be errors when looking at the source code for odejava.cxx, so I have a feeling that I should use a slightly older version of swig.

Once I try this and the build scripts in the build folder, if it doesn't compile, I'm not sure that there is much more that I can try.  Also, I think that someone needs to rewrite the odejava.i file for swig since ode has progressed a lot since the .i file was last written.

Offline lhkbob

JGO Knight

Medals: 32

« Reply #5 - Posted 2007-11-20 02:58:46 »

Tried the build scripts, didn't work because I need a dos2unix executable.  Where would I get one?

Offline irrisor

Junior Devvie

« Reply #6 - Posted 2007-11-20 08:47:43 »

fink? (I don't know - ask google Wink) You need new autotools (automake etc.) as well, these can be installed with fink, at least.
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.


Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CopyableCougar4 (8 views)
2015-01-26 10:47:56

Olo (13 views)
2015-01-26 03:26:00

Olo (14 views)
2015-01-26 00:44:22

Robo11 (24 views)
2015-01-25 12:14:26

basil_ (26 views)
2015-01-18 04:29:32

wxwsk8er (26 views)
2015-01-17 03:42:21

wxwsk8er (20 views)
2015-01-17 02:44:20

basil_ (25 views)
2015-01-14 15:46:59

basil_ (21 views)
2015-01-14 15:46:52

wxwsk8er (33 views)
2015-01-14 02:42:16
2D Dynamic Lighting
by ThePixelPony
2015-01-02 02:25:42

How do I start Java Game Development?
by gouessej
2014-12-28 01:41:21

Resources for WIP games
by kpars
2014-12-18 16:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-10 04:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-03 04:36:02

List of Learning Resources
by Longor1996
2014-08-16 16:40:00

List of Learning Resources
by SilverTiger
2014-08-06 01:33:27

Resources for WIP games
by CogWheelz
2014-08-01 22:20:17 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!