Box2d compile error using QT Creator


#1

Hey,

I tried to compile the Box2d examples with QT creator.

I get File or Folder not found errors for all Headers included with <> brackets

/home/brian/Dev/Tetris/addons/ofxBox2d/libs/Box2D/Collision/Shapes/b2CircleShape.cpp:19: fatal error: Box2D/Collision/Shapes/b2CircleShape.h: file or folder not found
#include <Box2D/Collision/Shapes/b2CircleShape.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
etc.

The examples compile well using make in the terminal

Does anyone have a clue?


#2

qtcreator is a little more strict about addons format than the makefiles system.

libraries source have to be in:

libs/libname/src

if you move the Box2D folder or it’s contents inside libs/box2d/src it should work fine


#3

Thank you Arturo! It works.

Just for the record:

move libs/Box2D -> libs/Box2D/src/Box2D 
move libs/triangle -> libs/triangle/include/triangle

#4

perhaps send a PR to the original repo? this will work with every other system so better if it follows the correct standard


#5

@bakercp already made a fork where he cleaned up the addon and did some more things. Best if he would do the PR.