Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 20 Apr 2014, 07:07
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Compiling first cairo graphics (hello world) program
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
James186282


Joined: 08 Sep 2009
Posts: 127
Location: Minnesota

PostPosted: Wed 14 Oct 2009, 15:14    Post subject:  Compiling first cairo graphics (hello world) program  

Hi everyone. I'm a retread from various other computer systems. Windoze, Amiga, AtariTT, and most of my programming experience has been assembler. Ok, so I've got the compiler up and working and doing small routines to print to text to the terminal, beep the speaker, talk to a device on a serial port and so forth. My partner wants me to show him an example of drawing a line on the screen and my friend (and doctor) told me to use the cairo graphics scheme of doing this. I downloaded the "hello.c" source and tried to compile it and got the missing file cairo.h message. I've downloaded the .pet of cairo for users and developers and have a set of .h files but.... I don't grock how to point the compiler to this other then to put a path in my source which I assume is pretty crude?

Sorry to be a putz with so many questions but it always seems to take me a while to get started. Once going I'm better! Wink

- James
Back to top
View user's profile Send private message 
James186282


Joined: 08 Sep 2009
Posts: 127
Location: Minnesota

PostPosted: Wed 14 Oct 2009, 16:28    Post subject:  

BTW I tried the following

g++ -o cairo1 -I/usr/include/cairo cairo1.c
*note this is where the cairo.h really is located /usr/include/cairo
and got
/tmp/cccu1vWh.o: In function 'main':
and then the same long list of undefined reference to things in the cairo.h file such as 'cairo_image_surface_create'
Back to top
View user's profile Send private message 
James186282


Joined: 08 Sep 2009
Posts: 127
Location: Minnesota

PostPosted: Thu 15 Oct 2009, 11:19    Post subject: Compiling cairo graphics [SOLVED]  

I was using the ' ' (quotes) key not the ` ` key to set some of the compiler options I got my little crude line drawing routine to click along and I'm sorry for the frantic questions. I can't quite express how excited I am about this.

A couple of observations. Speed wise this is amazing. I'm told this (4.30) as downloaded from the web is not really "trimmed down" fully for speed! I am really really pleased as its making my "junk" laptop the computer I "used" to love but even more. Because as dumb as I am at figuring things out they CAN be figured out.

One thing that really pleases me which is such a small thing. The computer is not constantly reading the hard disk on its own for unknown reasons. Having a minimum of these "squirrel" programs running in the background is SOoooooo nice...
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2169

PostPosted: Thu 15 Oct 2009, 14:33    Post subject:  

"g++ -o cairo1 -I/usr/include/cairo cairo1.c"
Try adding -L/path/to/libcairo
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0428s ][ Queries: 12 (0.0057s) ][ GZIP on ]