Index: [thread] [date] [subject] [author]
  From: Marcus Sundberg <mackan@stacken.kth.se>
  To  : Axys <frederic.dogimont@wanadoo.fr>
  Date: Mon, 07 Jun 1999 12:48:03 +0000

Re: FW: Help, i can't compil my prog.

Thomas Tanner wrote:
> 
> -----FW: <Version.32.19990602181921.00dce350@pop.wanadoo.fr>-----
> 
> Date: Sun, 06 Jun 1999 22:33:51 +0200
> From: Axys <frederic.dogimont@wanadoo.fr>
> To: tanner@ggi-project.org
> Subject: Help, i can't compil my prog.
> 
> Hello,
> 
> I hope that i send this e-mail at the good address...
> 
>     (sorry, I'am french and i have a very bad english)
> 
> my problem is:
> 
>   I write (and copy in the LibGGI API Manual) this program:
> 
> #include<stdlib.h>
> #include<stdio.h>
> #include<unistd.h>
> #include<ggi/ggi.h>
> 
> int main(int argc, char **argv)
> {
>   ggi_visual_t vis;
>   ggi_mode mode;
>   int i;
>   unsigned char *fbptr[2];
>   int stride[2];
>   int numbufs;
> 
>   mode.frames = 2;        /* Double-buffering */
>   mode.visible.x = 640;
>   mode.visible.y = 480;
>   mode.virt.x = GGI_AUTO;
>   mode.virt.y = GGI_AUTO;
>   mode.graphtype = GT_16BIT;
>   mode.dpp.x = mode.dpp.y = GGI_AUTO;
> 
>   if (ggiInit() != 0)
>     {
>       fprintf(stderr, "unable to initialize libggi, exiting.\n");
>       exit(1);
>     }
> 
>   vis = ggiOpen(NULL);
> 
>   if (!vis)
>     {
>       ggiPanic("Couldn't open default visual!\n");
>     }
> 
>   if (ggiSetMode(vis, &mode))
>     {
>       ggiPanic("Cannot set 640*480 16bit mode\n");
>     }
>   numbufs = ggiDBGetNumBuffers(vis);
>   for (i=0; i<numbufs; i++)
>     {
>       ggi_directbuffer *db;
>       db=ggiDBGetBuffer(vis, i);
>         if (!(db->type & GGI_DB_SIMPLE_PLB))
>           {
>             fprintf(sterr, "Error: non-standart display buffer\n");
>           }
>     }
> 
> /* main code here */
> 
>   ggiClose(vis);
>   ggiExit();
> }
> 
> My probleme is when I execute this program, there is an error:
> error in loading shared libraries: libggi.so.2: cannot open shared object
> file: no such file or directory.
> 
> The libggi.so.2 exist in the /usr/local/lib, it's a link to
> libggi.so.2.0.0. When I execute the demos send with GGIlib, they works
> perfectly...

Add the line:
/usr/local/lib
to the file /etc/ld.so.conf

//Marcus
-- 
-------------------------------+------------------------------------
        Marcus Sundberg        | http://www.stacken.kth.se/~mackan/
 Royal Institute of Technology |       Phone: +46 707 295404
       Stockholm, Sweden       |   E-Mail: mackan@stacken.kth.se

Index: [thread] [date] [subject] [author]