I downloaded the opencv addons again just to be sure, created a new project and added everything properly. When I try to compile it says…
1>ofCvGrayscaleImage.cpp
1>c:\openframeworks\v0.03\addons\ofopencv\ofCvContourFinder.h(15) : error C2061: syntax error : identifier ‘ofCvGrayscaleImage’
1>c:\openframeworks\v0.03\addons\ofopencv\ofCvContourFinder.h(24) : error C2146: syntax error : missing ‘;’ before identifier ‘inputCopy’
1>c:\openframeworks\v0.03\addons\ofopencv\ofCvContourFinder.h(24) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\openframeworks\v0.03\addons\ofopencv\ofCvContourFinder.h(24) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
ofCvMain looks like this, so contourfinder should know what a greyscale image is
hey chris, I know it’s probably massive, but can you post it so i can take a look? I bet it’s something small, but hard to see from here. I don’t think 0.02->0.03 changed anything big, so I think it’s just a path issue…
1>c:\openframeworks\v0.03\addons\ofopencv\ofCvContourFinder.h(25) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\openframeworks\v0.03\addons\ofopencv\ofCvContourFinder.h(25) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
I also get a warning (but not an error) on ofXML, but that is maybe a suggestion for later 1>…\addons\ofXML\xmlParser.cpp(311) : warning C4267: ‘return’ : conversion from ‘size_t’ to ‘int’, possible loss of data
No worries, I’m glad I can help contribute to you finding things
I think that sounds like a good idea. I was going to suggest that ofAddons.h be project specific anyway. Otherwise you have to include all the addons libraries and links for every project, even if you don’t want to use those addons.
What do you think?
this has the benifit of allowing you to do per-project choices of what you want to use, and to not use all of the addons that you put in. it also clearly identifies in your code which addons your used so that it might be easier to recreate your project. the downside is some weirdness with #defines (as we see above, the more #inlcudes we have, the more chances for recursive inlcudes and stuff like that).
this is our current plan we are working on but very open to suggestions from folks. it’s gonna take some playing this next weeks to see how addons can work well but we are excited to open up the of codebase and we have alot of good addons already done to post and in the works…
[quote author=“zach”]now you have to include the opencv libraries in the linker
[/quote]
I always forget to add cv.lib and cxcore.lib in the linker. This now compiles, thanks.
I’ve also put cv097.dll and cxcore097.dll into \other\dlls\ so that they are copied when you compile like the other libraries. Maybe this should be part of the install instructions for addons using dlls.
the downside of doing that is you will get the cv.dll for all of your apps, not just the ones that use opencv. if you don’t mind then put it in that folder, but I could see that getting pretty big with alot of addons…