c++overloadingcinder

cinder function overload error


In this simple cinder example (from cinder introduction - http://libcinder.org/docs/v0.8.4/hello_cinder.html) I get this compilation error:

myImage = gl::Texture( loadImage( loadResource( "image.jpg" ) ) );

Error 1 error C2661: 'cinder::app::App::loadResource' : no overloaded function takes 1 arguments

However documentation says:

DataSourceRef cinder::app::loadResource (   const std::string &     macPath  )

Any ideas?


Solution

  • Are you referring to the same function:

    cinder::app::App::loadResoure
    cinder::app::loadResource
    

    Never used this lib, but doc says the first function needs more parameters:

    http://libcinder.org/docs/v0.8.4/classcinder_1_1app_1_1_app.html#afef905bb792960152d38c2680f88ea33

    static DataSourceRef cinder::app::App::loadResource (   
           const std::string &  macPath,
           int  mswID,
           const std::string &  mswType  
    )