error when compiling gdal with openjpeg v2

111 views
Skip to first unread message

Ifrits

unread,
Apr 1, 2011, 7:32:53 AM4/1/11
to OpenJPEG
Hi,

I've compiled without any problem openjpeg V.2 with V.S. 2005.
When I add this library to compile gdal, I get errors in the linking:

1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_end_decompress sin resolver al que se hace referencia en la
función "public: virtual enum CPLErr __thiscall
JP2OpenJPEGRasterBand::IReadBlock(int,int,void *)" (?
IReadBlock@JP2OpenJPEGRasterBand@@UAE?AW4CPLErr@@HHPAX@Z)
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_image_destroy sin resolver al que se hace referencia en la
función "public: virtual enum CPLErr __thiscall
JP2OpenJPEGRasterBand::IReadBlock(int,int,void *)" (?
IReadBlock@JP2OpenJPEGRasterBand@@UAE?AW4CPLErr@@HHPAX@Z)
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_stream_destroy sin resolver al que se hace referencia en la
función "public: virtual enum CPLErr __thiscall
JP2OpenJPEGRasterBand::IReadBlock(int,int,void *)" (?
IReadBlock@JP2OpenJPEGRasterBand@@UAE?AW4CPLErr@@HHPAX@Z)
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_read_header sin resolver al que se hace referencia en la función
"public: virtual enum CPLErr __thiscall
JP2OpenJPEGRasterBand::IReadBlock(int,int,void *)" (?
IReadBlock@JP2OpenJPEGRasterBand@@UAE?AW4CPLErr@@HHPAX@Z)
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_stream_set_user_data sin resolver al que se hace referencia en la
función "public: virtual enum CPLErr __thiscall
JP2OpenJPEGRasterBand::IReadBlock(int,int,void *)" (?
IReadBlock@JP2OpenJPEGRasterBand@@UAE?AW4CPLErr@@HHPAX@Z)
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_stream_set_skip_function sin resolver al que se hace referencia
en la función "public: virtual enum CPLErr __thiscall
JP2OpenJPEGRasterBand::IReadBlock(int,int,void *)" (?
IReadBlock@JP2OpenJPEGRasterBand@@UAE?AW4CPLErr@@HHPAX@Z)
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_stream_set_seek_function sin resolver al que se hace referencia
en la función "public: virtual enum CPLErr __thiscall
JP2OpenJPEGRasterBand::IReadBlock(int,int,void *)" (?
IReadBlock@JP2OpenJPEGRasterBand@@UAE?AW4CPLErr@@HHPAX@Z)
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_stream_set_read_function sin resolver al que se hace referencia
en la función "public: virtual enum CPLErr __thiscall
JP2OpenJPEGRasterBand::IReadBlock(int,int,void *)" (?
IReadBlock@JP2OpenJPEGRasterBand@@UAE?AW4CPLErr@@HHPAX@Z)
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_destroy_codec sin resolver al que se hace referencia en la
función "public: virtual enum CPLErr __thiscall
JP2OpenJPEGRasterBand::IReadBlock(int,int,void *)" (?
IReadBlock@JP2OpenJPEGRasterBand@@UAE?AW4CPLErr@@HHPAX@Z)
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_setup_decoder sin resolver al que se hace referencia en la
función "public: virtual enum CPLErr __thiscall
JP2OpenJPEGRasterBand::IReadBlock(int,int,void *)" (?
IReadBlock@JP2OpenJPEGRasterBand@@UAE?AW4CPLErr@@HHPAX@Z)
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_set_default_decoder_parameters sin resolver al que se hace
referencia en la función "public: virtual enum CPLErr __thiscall
JP2OpenJPEGRasterBand::IReadBlock(int,int,void *)" (?
IReadBlock@JP2OpenJPEGRasterBand@@UAE?AW4CPLErr@@HHPAX@Z)
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_set_error_handler sin resolver al que se hace referencia en la
función "public: virtual enum CPLErr __thiscall
JP2OpenJPEGRasterBand::IReadBlock(int,int,void *)" (?
IReadBlock@JP2OpenJPEGRasterBand@@UAE?AW4CPLErr@@HHPAX@Z)
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_set_warning_handler sin resolver al que se hace referencia en la
función "public: virtual enum CPLErr __thiscall
JP2OpenJPEGRasterBand::IReadBlock(int,int,void *)" (?
IReadBlock@JP2OpenJPEGRasterBand@@UAE?AW4CPLErr@@HHPAX@Z)
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_set_info_handler sin resolver al que se hace referencia en la
función "public: virtual enum CPLErr __thiscall
JP2OpenJPEGRasterBand::IReadBlock(int,int,void *)" (?
IReadBlock@JP2OpenJPEGRasterBand@@UAE?AW4CPLErr@@HHPAX@Z)
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_create_decompress sin resolver al que se hace referencia en la
función "public: virtual enum CPLErr __thiscall
JP2OpenJPEGRasterBand::IReadBlock(int,int,void *)" (?
IReadBlock@JP2OpenJPEGRasterBand@@UAE?AW4CPLErr@@HHPAX@Z)
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_end_compress sin resolver al que se hace referencia en la función
"public: static class GDALDataset * __cdecl
JP2OpenJPEGDataset::CreateCopy(char const *,class GDALDataset
*,int,char * *,int (__stdcall*)(double,char const *,void *),void *)" (?
CreateCopy@JP2OpenJPEGDataset@@SAPAVGDALDataset@@PBDPAV2@HPAPADP6GHN0PAX@Z3@Z)
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_start_compress sin resolver al que se hace referencia en la
función "public: static class GDALDataset * __cdecl
JP2OpenJPEGDataset::CreateCopy(char const *,class GDALDataset
*,int,char * *,int (__stdcall*)(double,char const *,void *),void *)" (?
CreateCopy@JP2OpenJPEGDataset@@SAPAVGDALDataset@@PBDPAV2@HPAPADP6GHN0PAX@Z3@Z)
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_stream_set_write_function sin resolver al que se hace referencia
en la función "public: static class GDALDataset * __cdecl
JP2OpenJPEGDataset::CreateCopy(char const *,class GDALDataset
*,int,char * *,int (__stdcall*)(double,char const *,void *),void *)" (?
CreateCopy@JP2OpenJPEGDataset@@SAPAVGDALDataset@@PBDPAV2@HPAPADP6GHN0PAX@Z3@Z)
1>NMAKE : fatal error U1077: '"C:\Archivos de programa\Microsoft
Visual Studio 8\VC\bin\link.EXE"' : c¾digo devuelto '0x460'
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_setup_encoder sin resolver al que se hace referencia en la
función "public: static class GDALDataset * __cdecl
JP2OpenJPEGDataset::CreateCopy(char const *,class GDALDataset
*,int,char * *,int (__stdcall*)(double,char const *,void *),void *)" (?
CreateCopy@JP2OpenJPEGDataset@@SAPAVGDALDataset@@PBDPAV2@HPAPADP6GHN0PAX@Z3@Z)
1>Stop.
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_image_tile_create sin resolver al que se hace referencia en la
función "public: static class GDALDataset * __cdecl
JP2OpenJPEGDataset::CreateCopy(char const *,class GDALDataset
*,int,char * *,int (__stdcall*)(double,char const *,void *),void *)" (?
CreateCopy@JP2OpenJPEGDataset@@SAPAVGDALDataset@@PBDPAV2@HPAPADP6GHN0PAX@Z3@Z)
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_create_compress sin resolver al que se hace referencia en la
función "public: static class GDALDataset * __cdecl
JP2OpenJPEGDataset::CreateCopy(char const *,class GDALDataset
*,int,char * *,int (__stdcall*)(double,char const *,void *),void *)" (?
CreateCopy@JP2OpenJPEGDataset@@SAPAVGDALDataset@@PBDPAV2@HPAPADP6GHN0PAX@Z3@Z)
1>openjpegdataset.obj : error LNK2019: símbolo externo
_opj_set_default_encoder_parameters sin resolver al que se hace
referencia en la función "public: static class GDALDataset * __cdecl
JP2OpenJPEGDataset::CreateCopy(char const *,class GDALDataset
*,int,char * *,int (__stdcall*)(double,char const *,void *),void *)" (?
CreateCopy@JP2OpenJPEGDataset@@SAPAVGDALDataset@@PBDPAV2@HPAPADP6GHN0PAX@Z3@Z)

Any clue why these errors occur?

Thanks

Vincent Torri

unread,
Apr 2, 2011, 5:57:07 AM4/2/11
to open...@googlegroups.com
Hey,



It's a bug with the dllexport not correctly being defined. It has been fixed in v1, it should be backported to v2

Vincent

Ifrits

unread,
Apr 7, 2011, 6:39:05 AM4/7/11
to OpenJPEG
Thank's you.

So you can not use gdal with openjpeg V2 version, right?

Antonin Descampe

unread,
Apr 13, 2011, 5:36:21 AM4/13/11
to open...@googlegroups.com

Indeed. Thanks Vincent for having pointed the origin of this bug. Do you think you could submit a patch to fix this ?

--
You are subscribed to the mailing-list of the OpenJPEG project.
Latest news and updates about the project: http://www.openjpeg.org
To post: email to open...@googlegroups.com
To unsubscribe: email to openjpeg+u...@googlegroups.com
For more options: visit http://groups.google.com/group/openjpeg?hl=en?hl=en

Vincent Torri

unread,
Apr 13, 2011, 6:46:47 AM4/13/11
to open...@googlegroups.com
On Wed, Apr 13, 2011 at 11:36 AM, Antonin Descampe <antonin....@uclouvain.be> wrote:

Indeed. Thanks Vincent for having pointed the origin of this bug. Do you think you could submit a patch to fix this ?

here it is. But the code needs a lot of love. Copyright notices not up to date (same in openjpeg v1), terrible indentation, all the modifications WIN32 --> _WIN32 to be done, autotools to be done (well, i already sent you the autotools, actually), etc...

Vincent
 
openjpeg2_export.diff

Antonin Descampe

unread,
Apr 13, 2011, 7:03:40 AM4/13/11
to open...@googlegroups.com

Thanks Vincent. Patch applied. Ifrits, could you check that your problem is fixed ?

I know there a lot of things to do in V2 branch. I've started to do some cleanup and with the help of guys from Orpheo toolbox, we will soon start the merge of v2 with the trunk. More news to come.

Cheers,

Antonin 

<openjpeg2_export.diff>

--
Dr. Antonin Descampe
Post-doctoral researcher

 http://www.tele.ucl.ac.be/~descampe
 Communications and Remote Sensing Lab (TELE),
 Institute of Information and Communication Technologies,
     Electronics and Applied Mathematics (ICTEAM),
 UCL, Belgium.

Reply all
Reply to author
Forward
0 new messages