Closed 2bbb closed 3 months ago
ofPixels should be included by ofImage
I've seen ofPixels.h is included in ofImage.cpp file. are you using latest @2bbb ?
@dimitre
sorry, my explanation and code sample were not good.
the problem is caused on ofImage.h
.
because ofImage
has instance of ofPixels
.
if ofImage
has pointer, shared pointer, or reference of ofPixels
then forward declaration is good way to reduce header dependencies. but relation of ofImage and ofPixels is not so.
therefore, ofImage.h
needs to ofPixels.h
Great. feel free to make the PR, I was trying to reduce the .h included in other .h files but it seems it was not a good idea there!
OK! I will create PR soon!
simple sample code with error.
and error message is: "libs/openFrameworks/graphics/ofImage.h:643:26 Implicit instantiation of undefined template 'ofPixels_'"
this is caused by ofPixels is only declared without definition.
if it is needed to fix, I will create PR.