Build the Box2D in Ubuntu 15.04
This document describes how to build Testbed from the source code for Ubuntu 15.04.
- Fetch Box2D sources code from Google-code by svn.
- svn checkout http://box2d.googlecode.com/svn/tags/v2.3.1
- Read v2.3.1/Box2D/Building.txt first.
- Download premake4.4-beta5(beta) from premake's web.
- Install libglfw3* by apt-get or things like that.
- v2.3.1/Box2D$ premake4 gmake
- edit v2.3.1/Box2D/Build/gmake/Testbed.make (Debug and Release)
- LIBS += $(LDDEPS) -lX11 -lGL -lGLU -lglut
- ↓
- LIBS += $(LDDEPS) -lX11 -lGL -lGLU -lglut -lGLEW -lglfw -lXxf86vm -lpthread
- If you don't edit above, you'll get linking many errors.
- Linking Testbed
- obj/Debug/Testbed/RenderGL3.o: In function `sDrawPolygon(float const*, unsigned int, float, unsigned int)':
- /home/.../repos/v2.3.1/Box2D/Build/gmake/../../Testbed/Framework/RenderGL3.cpp:357: undefined reference to `__glewBindVertexArray'
- /home/.../repos/v2.3.1/Box2D/Build/gmake/../../Testbed/Framework/RenderGL3.cpp:358: undefined reference to `__glewBindBuffer'
- .....
- run make
- Link the font path for UI.
v2.3.1/Box2D/Build/gmake/bin$ ln -s ../../Data/ Data - run v2.3.1/Box2D/Build/gmake/bin/Debug/Testbed
コメント
コメントを投稿