I need to directly access the libpng functions so I can manually write PNG images via inline. I've added ones for OpenGL without a problem but I'm getting problems with libpng. For example the function png_create_write_struct takes 4 arguments but I'm getting this error output:
This is the code I have so far:
I've downloaded version 1.2.6 of libpng and looked to make sure the function takes 4 args which it does so I don't get why it's saying too many arguments to function. Is it possible that the libpng library GLBasic uses is customized?
Code (glbasic) Select
C:\DOCUME~1\SYNTHE~1.SYN\LOCALS~1\Temp\glbasic\gpc_tempa.cpp: In function `DGInt __GLBASIC__::png_create_write_struct()':
C:\DOCUME~1\SYNTHE~1.SYN\LOCALS~1\Temp\glbasic\gpc_tempa.cpp:95: error: too many arguments to function `DGInt __GLBASIC__::png_create_write_struct()'
C:\DOCUME~1\SYNTHE~1.SYN\LOCALS~1\Temp\glbasic\gpc_tempa.cpp:99: error: at this point in file
This is the code I have so far:
Code (glbasic) Select
INLINE
}
#define PNG_LIBPNG_VER_STRING "1.2.6"
extern "C"
{
void __stdcall png_create_write_struct(char,int,int,int);
}
namespace __GLBASIC__
{
ENDINLINE
FUNCTION png_create_write_struct:
LOCAL ptr
INLINE
ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING,0,0,0);
ENDINLINE
return ptr
ENDFUNCTION
I've downloaded version 1.2.6 of libpng and looked to make sure the function takes 4 args which it does so I don't get why it's saying too many arguments to function. Is it possible that the libpng library GLBasic uses is customized?