LibGDX Box2D libraries

Started by
3 comments, last by MatejaS 9 years ago

I am making a game in LibGDX. I only want to target PC, so I didn't use gdx-setup, and added jars manually instead (I know it's generally a bad idea). Now I want to add Box2D to the project. What libraries do I need to add so it would work on all platforms (Windows, Mac, Linux).

gdx-box2d.jar

gdx-box2d-natives.jar

Are these two all I need? There are other armeabi and x86 .so files...What are they for?

Any help will be greatly appreciated.

MatejaS

Advertisement

As far as I can remember gdx-setup adds armeabi .so for getting ARM support ( mobile devices ), and x86 for PC support.

And the .jar files you've mentioned are just java/jni wrappers on the top of the cross-compiled ( in case of ARM ) libraries. So you need to add .so (dll) file for x86 to support PC.

By the way, why not use gdx-setup?

P.S.

You may consider using gradle for managing dependencies for you. See this libgdx wiki page for details.

Yes, just use those two. For Bullet its the same, gdx-bullet.jar and gdx-bullet-natives.jar

The ARM files are probably separate since you wouldn't distribute your application in a .jar for those devices in the first place (need RoboVM for iOS, .apk and DEX for Android), so cant put those in the *-natives.jar.

And the .jar files you've mentioned are just java/jni wrappers on the top of the cross-compiled ( in case of ARM ) libraries. So you need to add .so (dll) file for x86 to support PC.

No, the *-natives.jar contains those. Its designed that way so you don't have to specifically create a directory path to load the native libraries (unlike say, LWJGL), libGDX resolves the path automatically loading them as resources inside the natives jar. You can open them with anything that supports ZIP compression to see whats inside, you'll see the .dll for windows, .so for Linux and .dylib for OSX, x86 and x86_64 versions.

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

My journals: dustArtemis ECS framework and Making a Terrain Generator


You can open them with anything that supports ZIP compression to see whats inside, you'll see the .dll for windows, .so for Linux and .dylib for OSX, x86 and x86_64 versions.

Wow, didn't know that, thanks.

Thank you :)

This topic is closed to new replies.

Advertisement