Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boost:GIL / LibPNG 1.4; ‘int_p_NULL’ was not declared in this scope #8

Open
GoogleCodeExporter opened this issue Mar 25, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link


What steps will reproduce the problem?

Compile using cmake .


What is the expected output? What do you see instead?

During compilation, the following error message occurs:
error: ‘int_p_NULL’ was not declared in this scope


What version of the product are you using? On what operating system?

gilviewer revision 120
Arch Linux, kernel 2.6.35
gcc 4.5
libpng 1.4.3


Please provide any additional information below.

This is an issue within the GIL extension; libpng 1.4 dropped declaration for 
int_p_NULL; the following needs to be added within GIL or before inclusion of 
GIL headers:
#define int_p_NULL (int*)NULL

Reference: http://libpng.sourceforge.net/ANNOUNCE-1.4.1.txt

Original issue reported on code.google.com by dfs...@gmail.com on 26 Aug 2010 at 2:33

@GoogleCodeExporter
Copy link
Author

Correction: png_infopp_NULL also needs to be declared.
#define png_infopp_NULL (png_infopp)NULL
#define int_p_NULL (int*)NULL

Original comment by dfs...@gmail.com on 26 Aug 2010 at 3:09

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Patch for /src/GilViewer/layers/ImageLayer.cpp

Original comment by dfs...@gmail.com on 26 Aug 2010 at 3:45

  • Added labels: ****
  • Removed labels: ****

Attachments:

@GoogleCodeExporter
Copy link
Author

Patch for /src/GilViewer/layers/ImageLayer.cpp

Original comment by dfs...@gmail.com on 26 Aug 2010 at 3:46

  • Added labels: ****
  • Removed labels: ****

Attachments:

@GoogleCodeExporter
Copy link
Author

Hi,

Thank you for your patch. Do you currently use the stable or unstable branch?

Regards,

Olivier

Original comment by olit...@gmail.com on 30 Aug 2010 at 9:07

  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

Thanks for that, the problem still exist and we have to add :

#define png_infopp_NULL (png_infopp)NULL
#define int_p_NULL (int*)NULL
#define png_bytep_NULL (png_bytep)NULL

and change png_'set_gray_1_2_4_to_8(png_ptr)' to 
'png_set_expand_gray_1_2_4_to_8(png_ptr)'

Regards

Original comment by sdevil...@gmail.com on 9 Feb 2012 at 1:08

  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant