Problems compiling a pluging for 0.9.4+

I’m trying to recompile a pluging that works ok with versions < 0.9.4, but get this:

error: invalid conversion from âint32_t ()(OrthancPluginRestOutput, const char*, const OrthancPluginHttpRequest*) {aka int ()(_OrthancPluginRestOutput_t, const char*, const OrthancPluginHttpRequest*)}â to âOrthancPluginRestCallback {aka OrthancPluginErrorCode ()(_OrthancPluginRestOutput_t, const char*, const OrthancPluginHttpRequest*)}â [-fpermissive]

Seems that the OrthancPluginInitialize, have change … are there any docs about the new structures or the proc I must follow ?

Yes, the API has slightly changed with respect to the error codes.

  • Up to 0.9.5 (inclusive), the callbacks had to return an integer.

  • Since 0.9.5 (inclusive), the callbacks must return an OrthancPluginErrorCode.

Note however that the plugins that were compiled with an SDK <= 0.9.4 will keep working within Orthanc >= 0.9.5.

The latest releases of the Web viewer and the PostgreSQL official plugins have been updated to compile with SDK >= 0.9.5. The DICOMweb release is expected to be fixed for tomorrow.