ofxBox2d not working in visual studio


#1

I’m struggling with ofxBox2d in vs2015. This addons works fine in OSX but not in Windows.

I have tried two methods.

One method is use the Project generator. I didn’t write any code.Just add this example in the project.This is the error message.

And then i try to add ofxBox2d by visual studio plugin (https://marketplace.visualstudio.com/items?itemName=ArturoCastro.openFrameworksplugin). Here is anther error message

I am not sure if there is a missing step .Any one meet the same problem ? Thank u ~


#2

what version of OF are you using?


#3

Hi,vanderlin.I’m using OF 0.98 . in Win 10 - 64 bit


#4

You need to pull the stable version - master is using a newer version of OF


#5

Hi,vanderlin.Thanks for reply. Now I had use stable verision.Error is less than before.But still not working.Here is the error message

(just use project generator and add ofxBox2d,don’t write any code)

( try to add ofxBox2d by visual studio plugin)


#6

I found the solution here ~ ofxBox2D not compiling


By larchrono

fix the code of file “of_v0.9.8_vs_release\addons\ofxbox2d\src\ofxBox2dPolygonUtils.h”

line 115

int mk[n];

to

int* mk = new int[n];

then it will work