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 Wed 17 Dec 2014, 20:57
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 Posts_count  
Author Message
James186282


Joined: 08 Sep 2009
Posts: 149
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: 149
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: 149
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: 2287

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:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0442s ][ Queries: 11 (0.0045s) ][ GZIP on ]