Re: compilation errors

2015-01-02 Thread Ruben Safir
On Fri, Jan 02, 2015 at 11:38:12PM -0500, Ruben Safir wrote:
> Hi
> 
> I'm making a new Marjaro/Arch package but I ran inot aan error on 
> load_gif.cc from the library lgif
> 
> In file included from load_gif.c:29:0:
> /usr/include/gif_lib.h:183:9: note: declared here
>  int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
>  ^
> load_gif.c:219:3: error: too few arguments to function 'DGifCloseFile'
>DGifCloseFile(gif)
> 
> It looks like a fundemental programing disagreement...
> 
> [ruben@stat13 WindowMaker-0.95.6]$ ls -al /usr/include/gif_lib.h
> -rw-r--r-- 1 root root 13402 May 27  2014 /usr/include/gif_lib.h
> 
> 
> ~~~
> 
> /**
>  GIF decoding routines
> **/
> 
> /* Main entry points */
> GifFileType *DGifOpenFileName(const char *GifFileName, int *Error);
> GifFileType *DGifOpenFileHandle(int GifFileHandle, int *Error);
> int DGifSlurp(GifFileType * GifFile);
> GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error);
> /* new one (TVT) */
> int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
> 
> 


FWIW, it seems that there is an updated gif library


https://a3a2l.wordpress.com/2014/08/07/building-openscenegraph-on-linux/


OpenSceneGraph is using an older signature of the DGifCloseFile function
in libgif that got changed in version 5.1:

int DGifCloseFile(GifFileType *GifFile) // old
int DGifCloseFile(GifFileType *GifFile, int *ErrorCode) //new

As a workaround, and a clumsy one for that matter, I simply edited the
source code file
(../OpenSceneGraph-3.2.1/src/osgPlugins/gif/ReaderWriterGIF.cpp) and
changed line 564 to:

DGifCloseFile(giffile, 0); // I just assumed 0 is the exit code for a
successful close

OpenSceneGraph should now build successfully.

Note: In case you are using a x64 system, make sure to set
“/usr/local/lib64/” as your LD_LIBRARY_PATH environment variable.
Share this:


This entry was tagged 64, build, cmake, DGifCloseFile, error, lib gif,
libgif, linux, make, open scene graph, openscenegraph, osg, workaround.


-- 
To unsubscribe, send mail to [email protected].


compilation errors

2015-01-02 Thread Ruben Safir
Hi

I'm making a new Marjaro/Arch package but I ran inot aan error on 
load_gif.cc from the library lgif

In file included from load_gif.c:29:0:
/usr/include/gif_lib.h:183:9: note: declared here
 int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);
 ^
load_gif.c:219:3: error: too few arguments to function 'DGifCloseFile'
   DGifCloseFile(gif)

It looks like a fundemental programing disagreement...

[ruben@stat13 WindowMaker-0.95.6]$ ls -al /usr/include/gif_lib.h
-rw-r--r-- 1 root root 13402 May 27  2014 /usr/include/gif_lib.h


~~~

/**
 GIF decoding routines
**/

/* Main entry points */
GifFileType *DGifOpenFileName(const char *GifFileName, int *Error);
GifFileType *DGifOpenFileHandle(int GifFileHandle, int *Error);
int DGifSlurp(GifFileType * GifFile);
GifFileType *DGifOpen(void *userPtr, InputFunc readFunc, int *Error);
/* new one (TVT) */
int DGifCloseFile(GifFileType * GifFile, int *ErrorCode);




-- 
So many immigrant groups have swept through our town
that Brooklyn, like Atlantis, reaches mythological
proportions in the mind of the world - RI Safir 1998
http://www.mrbrklyn.com 

DRM is THEFT - We are the STAKEHOLDERS - RI Safir 2002
http://www.nylxs.com - Leadership Development in Free Software
http://www2.mrbrklyn.com/resources - Unpublished Archive 
http://www.coinhangout.com - coins!
http://www.brooklyn-living.com 

Being so tracked is for FARM ANIMALS and and extermination camps, 
but incompatible with living as a free human being. -RI Safir 2013


-- 
To unsubscribe, send mail to [email protected].