c++ - Visual Studio 2015 "cannot instantiate abstract class" compile failures building openFrameworks 0.9.0 -


i trying build openframeworks 0.9.0 using visual studio 2015 , getting "cannot instantiate abstract class" compile failures. however, feel more vs2015 syntax issue versus openframeworks issue. code built using visual studio 2012 , openframeworks 0.8.4. know how implementing class's syntax should satisfy vs2015 should look?

the errors vs2015 compile are:

ofx*.cpp(46): error c2259: 'ofx*': cannot instantiate abstract class 1> ......\addons\ofx*i\libs\src\ofx*.cpp(46): note: due following members: 1> ......\addons\ofx*i\libs\src\ofx*.cpp(46): note: 'void ofbasedraws::draw(float,float,float,float) const': abstract 1> ...of_v0.9.0_vs_release\libs\openframeworks\types\ofbasetypes.h(75): note: see declaration of 'ofbasedraws::draw'  1> ......\addons\ofx*i\libs\src\ofx*.cpp(46): note: 'void ofbasedraws::draw(float,float) const': abstract 1> ...of_v0.9.0_vs_release\libs\openframeworks\types\ofbasetypes.h(67): note: see declaration of 'ofbasedraws::draw'  1> ......\addons\ofx*i\libs\src\ofx*.cpp(46): note: 'float ofbasedraws::getheight(void) const': abstract 1> ...of_v0.9.0_vs_release\libs\openframeworks\types\ofbasetypes.h(104): note: see declaration of 'ofbasedraws::getheight'  1> ......\addons\ofx*i\libs\src\ofx*.cpp(46): note: 'float ofbasedraws::getwidth(void) const': abstract 1> ...of_v0.9.0_vs_release\libs\openframeworks\types\ofbasetypes.h(108): note: see declaration of 'ofbasedraws::getwidth' 

the code inherited class: of_v0.9.0_vs_release\libs\openframeworks\types\ofbasetypes.h

has abstract object: ofbasedraws...which has following declarations:

/// \brief draw @ position @ native size. /// /// native size determined getwidth() , getheight(). /// /// \param x draw position on x axis. /// \param y draw position on y axis. virtual void draw(float x, float y) const=0;  /// \brief draw @ position specified size. /// /// \param x draw position on x axis. /// \param y draw position on y axis. /// \param w draw width. /// \param h draw height. virtual void draw(float x, float y, float w, float h) const=0; 

is follows:

/// \brief draw @ position @ native size. /// /// native size determined getwidth() , getheight(). /// /// \param x draw position on x axis. /// \param y draw position on y axis. virtual void draw(float x, float y) const=0;  /// \brief draw @ position specified size. /// /// \param x draw position on x axis. /// \param y draw position on y axis. /// \param w draw width. /// \param h draw height. virtual void draw(float x, float y, float w, float h) const=0; ...............................................  /// \brief height. /// \returns height. virtual float getheight() const = 0;  /// \brief width. /// \returns width. virtual float getwidth() const = 0; 

the openframeworks 0.8.4 code built vs2012 different:

virtual void draw(float x, float y)=0; virtual void draw(float x, float y, float w, float h)=0; ............................................... virtual float getheight()=0; virtual float getwidth()=0; 

sorry, must admit finding answer myself (embarrassed):

found convention in: of_v0.9.0_vs_release\libs\openframeworks\gl\oftexture.h:

using ofbasedraws::draw;  void draw(float x, float y) const; void draw(float x, float y, float w, float h) const; float getheight() const; float getwidth() const;  //*** , in oftexture.cpp:  void draw(float x, float y) { ..... } void draw(float x, float y, float w, float h) { .... } float getheight() { return height; } float getwidth() { return width; } 

Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -