#6693 closed defect (fixed)

BPG driver lacks GDALRegister_BPG

Reported by: shot2 Owned by: warmerdam
Priority: low Milestone:
Component: default Version: svn-trunk
Severity: minor Keywords: bpg driver
Cc:

Description

After compiling the BPG read-only driver (frmts/bpg/bpgdataset.cpp) by hand - according to instructions provided in the file - the resulting gdal_BPG.so plugin is unable to register the BPG driver.

Symptom:

/usr/local/bin/gdalinfo --format BPG
ERROR 1: /usr/local/lib/gdalplugins/gdal_BPG.so: undefined symbol: GDALRegisterMe
ERROR 1: /usr/local/lib/gdalplugins/gdal_BPG.so: undefined symbol: GDALRegister_BPG

This seems caused by GDALRegister_BPG() not being called anywhere in the code. Given the crude nature of the driver at this moment, a possible fix may be to alter bpgdataset.cpp before compilation:

Nasty workaround:

 CPL_C_START
 void CPL_DLL GDALRegister_BPG();
 #include "libbpg.h"
 CPL_C_END

Then gdal is able to decode BPG imagery successfully. Context: vanilla Ubuntu 16.04, gdal-svn-trunk-2016.10.23, libbpg-0.9.7

Change History (1)

comment:1 Changed 11 months ago by Even Rouault

Resolution: fixed
Status: newclosed

In 35886:

BPG: declare GDALRegister_BPG as C exported for building as a plugin (patch by shot2, fixes #6693)

Note: See TracTickets for help on using tickets.