noobdoesre / openjpeg

Automatically exported from code.google.com/p/openjpeg
Other
0 stars 0 forks source link

Error in openjpegV1.4 on compiling image_to_j2k: opj_create_image undefined #107

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi there, I trying to compile image_to_j2k on  Windows machine using 
Code::blocks and gcc.

It‘s now 7 years that I didn‘t really write code, so any dummy check as to 
be performed with me. For example I don‘t remenber that we have to include 
each .h files in every single .c file (I was thinking that once declared in the 
main.c it was for the whole project).

So, I have image_to_j2k as main c file and other .c & .h files (but not 
j2k_to_image or other main c file).
When compiling, opj_create_image is undefined.
I can found its declaration on openjpeg.h but nothing in openjpeg.c.
Then I also have some pb with cio.seek which is well defined in cio.h & cio.c.

Thanks for ur help.
Nic

Original issue reported on code.google.com by nicolas....@gmail.com on 12 Jan 2012 at 3:27

GoogleCodeExporter commented 9 years ago
Hi there,
I solve my problem by having a closer look on header files.
I modify them in order to have opj_image_xxxxx and opj_cio_xxxxx declaration 
respectively in image.h and cio.h files instead of openjpeg.h file.
I also had to comment the "OPJ_API" before the return type for all functions in 
openjpeg.h file declaration.

Thanks,
Nic

Original comment by nicolas....@gmail.com on 12 Jan 2012 at 1:04

GoogleCodeExporter commented 9 years ago
I believe this is fixed in either trunk or opj1.5 branch

Original comment by mathieu.malaterre on 29 May 2012 at 1:16