Compile errors from ofxCvImage.cpp

Hi All
I was trying to compile something for the iphone with an addon - openCv - and had the following two errors -
glRasterPos2f - not declared in this scope
glDrawPixels - not declared in this scope

They are in ofxCvImage.cpp

is this something I could fix somehow or maybe I am asking the impossible of the SDK!
There’s a chance I may have done something peculiar in the way I added the addon - still getting the hang of that, but I think it’s right
Any suggestions gratefully received
sevenspiral

It’s a OpenGL ES issue. If you get the latest OpenCV from the svn things should work fine. We recently added a #TARGET_OPENGLES where you are getting the error.

Let me know how it goes,
/stefan

Thanks Stefan, that sounds promising.
I have a problem though. My SVN client has worked fine with googlecode links (eg http://ofxiphone.googlecode.com/svn/trunk/) but when I am having trouble getting the right link for the openCV trunk. What should I be putting into the client? When I copy and paste the URL from the link in your reply, that doesn’t work. Can you advise? Thanks
sevenspiral

Hi,

I had the same problem as sevenspiral but when I updated to the latest rev (199) of OpenCV, I now have 45 linking errors along the lines of:

  
  
"_cvAbsDiff", referenced from:  
ofxCvGrayscaleImage::absDiff(ofxCvGrayscaleImage&, ofxCvGrayscaleImage&)in ofxCvGrayscaleImage.o  
ofxCvGrayscaleImage::absDiff(ofxCvGrayscaleImage&)in ofxCvGrayscaleImage.o  
  

I checked that “addons/ofxOpenCv/libs/opencv/lib/arm” is in the search path, but I’m not sure what else to do. I know it’s something silly, but I can’t put my finger on it…

Thanks!

hmmm… weird… i guess the only other thing i can think of is did you make sure to drag the library into your xcode project?

Hey,

I had the library but only had the arm files. I just added the osx folder and it runs! I’m not too sure why that is though, shouldn’t we only need the arm files on an iPhone? Could it be because the app also needs to run in the simulator?

yeah, it probably requires them for the simulator and maybe in the default build settings it asks for both. I bet theres a way to finetune it, but, i dunno. That’s pretty weird, but at least it works and we know why!

ah how lucky screenshots can be

definitely let me know if you make anything with it! im always psyched to see iphone art projects

so true about the screenshots, if i hadn’t seen that it would’ve taken forever to figure out…

Hello I found several links to build openCV for the arm architecture

http://zaaghad.blogspot.com/2009/02/universal-i386arm-opencv-framework-for.html

and this project that has a working app with openCV in xCode…it works great

http://github.com/niw/iphone-opencv-test

I added the openCv libraries from the previous project into an arm folder

but still no luck with the same erros
glRasterPos2f and glDrawPixels not declared

I was able to build working libraries by following the directions here: http://ildan.blogspot.com/2008/07/creat-…-pencv.html except using the 1.1 release of opencv instead of 1.0