paulobarcelos / ofxMacamPs3Eye

Fully featured and easy to use OpenFrameworks addon for using the PS3Eye camera on a Mac.
59 stars 17 forks source link

Another "abstract class" fix #2

Closed adonaldson closed 12 years ago

adonaldson commented 12 years ago

Update the type for setPixelFormat (from void to bool) to get it compiling.

I'm new to c++, Xcode, etc, so I this may not be the best fix, but it got me going. I'm on ML (10.8.2), Xcode 4.5.2.

paulobarcelos commented 12 years ago

Humm... this is really odd. The original setPixelFormat in ofBaseVideoGrabber is not type bool, but actually void. I cannot compile myself if it is set to bool. What version of of are you using? could you paste the whole error message here?

adonaldson commented 12 years ago

Hey, Looks like the type was changed in 0072.

The error I see is:

Virtual function 'setPixelFormat' has a different return type ('void') than the function it overrides (which has return type 'bool')

It goes on to say that the overridden virtual function is here: https://github.com/openframeworks/openFrameworks/blob/master/libs/openFrameworks/types/ofBaseTypes.h#L206

It looks as though this type changed between tag 0071 (https://github.com/openframeworks/openFrameworks/blob/0071/libs/openFrameworks/types/ofBaseTypes.h#L211) and 0072 (https://github.com/openframeworks/openFrameworks/blob/0072/libs/openFrameworks/types/ofBaseTypes.h#L206).

Edit: Here is where it all changed: https://github.com/openframeworks/openFrameworks/commit/a0fb4ac19525659f7ea41af0d3ab5dcb088c0e21

paulobarcelos commented 12 years ago

Oh... my bad, I was mislead to think I was testing against 0072, but I was in the wrong folder :s. I've implemented the fix myself now, so I will close without merging.

Thanks anyway for such thorough investigation!

adonaldson commented 12 years ago

No bother, thanks!