VC++2010 Can't find cairo-features.h

Hello! Not sure if this is the best place for this, or if it should be in the VS2010 section of the forum, but here goes…

I’ve been meddling with OF for a couple of months now, starting out (as I imagine a lot of people do) porting some code I wrote in Processing. I managed to get that to work pretty well on OSX/Xcode 4, using MSA Physics. I’m using the download from the main site of OF 007.

What I’m trying to do is port that to Windows (Windows 7 64 bit), using Visual C++ 2010 Express. First thing I did was try some of the examples- they work fine- compile and run.

I’ve copied the emptyExample and put in the testApp.h, testApp.cpp and main.cpp files with my code in them, and managed to get MSAPhysics recognised (I think- it’s no longer throwing an error when I #include it at least!). Instead, all I’m getting is the following:

1>  testApp.cpp  
1>c:\of_prerelease_v007_vs2010\libs\openframeworks\graphics\ofcairorenderer.h(3): fatal error C1083: Cannot open include file: 'cairo-features.h': No such file or directory  
1>  main.cpp  
1>c:\of_prerelease_v007_vs2010\libs\openframeworks\graphics\ofcairorenderer.h(3): fatal error C1083: Cannot open include file: 'cairo-features.h': No such file or directory  

Is there something I need to add or remove? Can anyone suggest something I’m doing wrong?

Hmm, evidently I haven’t managed to add the MSA libs correctly- I commented out

#include "ofCairoRenderer.h"  

which seems to solve (well, work around) the initial issue. Now it trips up trying to find MSAPhysics3D.h.

When adding add-ons in VS, do I have to manually copy any files? I tried to follow this-guide but not sure if it worked correctly…

OK, so I hadn’t added the MSAPhysics lib (or it’s dependencies) properly. Now I’m getting loads of errors about syntax problems in the MSA libs, especially on the Cinder related bits. Is there anything I need to change in the MSA libs? I’ve uncommented


but that doesn’t seem to have done the trick. I don’t think I did anything else to run this on OSX.

edit to add: The files it’s tripping up on are cindermath.h, color.h, and chantraits.h from the msacore\src\cinder-lite folder. Just an assortment of syntax errors from all three, which are referenced from msacore-of.h


yes, normally this is sufficient. Maybe the problem is in the empty example. I mean , when i want to build a new project. i start from and visual studio solution taken from an addon example because empty example usually gave me some issues like you received. Copy and paste a VS solution (.sln and .vcproj files) from the addons examples rename it, open .sln with notepad and change the name of the project . now if i don’t miss some step you will able to use. I have done so in order to use MSAlfluids.
Hope this may help you … if you have problems again i can post a VS solution.

Thanks for that. I managed to get it to run by updating the cinder-lite folder with the version from this-thread, excluded the MSVCRT library in the linker and added both MSA ObjCPointer files to the project directly (just including their directory didn’t work for some reason, although it was fine for the other two MSA libs).

From what I can gather the libs weren’t really written or tested with VS in mind so they’re a bit fiddly to get running.

It’s now running, albeit very slowly- 1-2fps on my beefy desktop compared to 30+fps on my Macbook. A problem for another day (and no doubt another thread).