Forum

> > Off Topic > How to compile the Box2D libraries
ForenübersichtOff Topic-ÜbersichtEinloggen, um zu antworten

Englisch How to compile the Box2D libraries

9 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Re: How to compile the Box2D libraries

TheOn1yLefT
BANNED Off Offline

Zitieren
Dark Byte hat geschrieben
I have downloaded Box2D and I have CMake and MinGW. How can I compile the Box2D libraries with MinGW?

And that's cause coffe isn't for children
(yes i don't knew what he is talking)

alt Re: How to compile the Box2D libraries

oxytamine
User Off Offline

Zitieren
TheOn1yLefT hat geschrieben
Dark Byte hat geschrieben
I have downloaded Box2D and I have CMake and MinGW. How can I compile the Box2D libraries with MinGW?

And that's cause coffe isn't for children
(yes i don't knew what he is talking)

That's because you don't speak english and sound like 5 years old child.

alt Re: How to compile the Box2D libraries

Flacko
User Off Offline

Zitieren
I think you meant that you included all the .h files

Yes, indeed, you should compile and link against the resulting .lib file to get rid from the undefined references.

Note that I didn't compile this library. Ever. I'm just reading the (lame) instructions it included in the zip file.

alt Re: How to compile the Box2D libraries

archmage
User Off Offline

Zitieren
No, I compiled the .cpp files. I used this:
Mehr >

Also, I have not been able to compile it yet. I run CMake then make and all I get is more makefiles.

alt Re: How to compile the Box2D libraries

Lee
Moderator Off Offline

Zitieren
If you want to compile the entire Box2D library into your application (without needing the libbox2d.so), you'll need to do

1
2
export b2d='/dir/to/box2dsource'
g++ -I$b2d $b2d/Box2D/Common/*.cpp $b2d/Box2D/Rope/*.cpp $b2d/Box2D/Collision/*.cpp $b2d/Box2D/Dynamics/Contacts/*.cpp $b2d/Box2D/Dynamics/Joints/*.cpp $b2d/Box2D/Dynamics/*.cpp $b2d/Box2D/Collision/Shapes/*.cpp your_application.cpp

This allows for portability
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antwortenOff Topic-ÜbersichtForenübersicht