LOADGIF.C(58): warning #2027: Missing prototype for 'Header' is what i get, along with 10 other prototype errors in a C source code.
I am trying to compile the ImageShop32 source by John F., and both Pelles and LccWin32 give the EXACT same errors.
H:\Pelles and C ex\ImageShop\LOADGIF.C(58): warning #2027: Missing prototype for 'Header'.
H:\Pelles and C ex\ImageShop\LOADGIF.C(75): warning #2114: Local 'lp' is not referenced.
H:\Pelles and C ex\ImageShop\LOADGIF.C(193): warning #2027: Missing prototype for 'IsNewDibFormat'.
H:\Pelles and C ex\ImageShop\LOADGIF.C(203): warning #2027: Missing prototype for 'DIBNumColours'.
H:\Pelles and C ex\ImageShop\LOADGIF.C(231): warning #2027: Missing prototype for 'ColourTableSize'.
H:\Pelles and C ex\ImageShop\LOADGIF.C(246): warning #2027: Missing prototype for 'CreateDIB'.
H:\Pelles and C ex\ImageShop\LOADGIF.C(300): error #2168: Operands of = have incompatible types 'struct tagRGBQUAD *' and 'unsigned char *'.
H:\Pelles and C ex\ImageShop\LOADGIF.C(336): warning #2027: Missing prototype for 'OutLine'.
H:\Pelles and C ex\ImageShop\LOADGIF.C(455): warning #2114: Local 'lp' is not referenced.
H:\Pelles and C ex\ImageShop\LOADGIF.C(536): error #2120: Redeclaration of 'LoadGIF' previously declared at H:\Pelles and C ex\ImageShop\loadgif.h(17): found 'void * __cdecl function' expected 'void * __stdcall function(char *)'.
Now LccWin32 did spit out OBJ files for all the C sources, in which i tried using the LoadGIF.OBJ in actually loading Gifs. What i found was that it could load EVERY gif that i had, a task most GIF decoders i have source for MISERABLY fail at.
However, the routine LoadGif would ONLY work when called in the MAIN code, and not nested inside a procedure call.
hglobal=loadGIF(LPZfilename)
BITMAPINFO bmpinfo =hglobal
LONG BitmapBits= bmpinfo+32+8 *16
HDC hScreenDc = GetDC(0)
HBITMAP newBitmap = CreateDIBitmap(hScreenDc, bmpinfo->bmiHeader, CBM_INIT,BitmapBits, bmpinfo, DIB_RGB_COLORS)
ReleaseDC(0,hScreenDc)
SendMessage(IDC_Static, STM_SETIMAGE,IMAGE_BITMAP,newBitmap)
I have tried using the OBJ file in a simple C program, as well as PureBasic, and they both crash when the LoadGIF is called from a procedure. My question is:
Are the errors from the compiler causing the function to crash? Why does the compiler create the OBJ file if these appear to be critical errors.
Finally, this is the ABSOLUTE BEST gif loading routine i have ever seen written, HANDS DOWN. Being that my goal is to create a full featured completely FREE image library for use in all languages, i have studied many, many routines. It has NEVER failed when called from the main code section. And i have used GIFs created from the web, Photoshop, Corel, AVD graphics studio ect.
Is there something i am missing here? The files LoadGIF.c and LoadGIF.h are attached. Is there something about the whole ImageShop32 package that cant be compiled on either LCC or Pelles?