creating a new cursor from an image and using it with Xcursor library

Stanislav Sedov stas at FreeBSD.org
Tue Jun 9 03:13:34 PDT 2009


On Tue, 9 Jun 2009 06:41:37 +0000
Meir Goldenberg <meirgold at hotmail.com> mentioned:

> 
> Hi,
> 
>  
> 
> I'm trying to create a new cursor which can be used with the XCURSOR cursor management library.
> 
> I have a picture which I converted to a png format and then used the "xcursorgen" to create a cursor file from.
> 
> In my C code I then used the following set of commands in order to read the cursor file:
> 
>  
> 
> FILE *pFile;
> 
> pFile=fopen("test.png","r");
> if (pFile!=NULL)
> {
>  printf("Reading File\n");
>  cursor=XcursorFileLoadImage(pFile, 100); 
>  fclose (pFile);
> }
> 
> 
> when trying to compile my code, I get the following error:
> 
> : undefined reference to `XcursorFileLoadImage'
> 
>  
> 
> It seems that i'm not giving the function what it is expecting, however, i'm not sure what I'm doing wrong.
> 
> I also tried reading the file in binary format using: pFile=fopen("test..png","rb");  however this did not help either.
> 
>  
> 
> Can someone please help me resolve this ?
>

You obviously missing -lXcursor in you compile string. This has nothing to do
with the code itself.

-- 
Stanislav Sedov
ST4096-RIPE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20090609/0cfba6c4/attachment.pgp>


More information about the xorg mailing list