LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-30-2009, 04:47 AM   #1
sarsah
LQ Newbie
 
Registered: Jun 2009
Posts: 2

Rep: Reputation: 0
graphics programming inlinux


hi
i am programming in graphics in C under linux. I am using curses.h.
the program is compiling without any error but when i run the error
"segmentation fault " results. After try to solve it i found that whenever i send any text on screen by using color or anything i get this error . plz help me as my project has stopped because of this.
 
Old 06-30-2009, 02:41 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,889

Rep: Reputation: 4259Reputation: 4259Reputation: 4259Reputation: 4259Reputation: 4259Reputation: 4259Reputation: 4259Reputation: 4259Reputation: 4259Reputation: 4259Reputation: 4259
Quote:
Originally Posted by sarsah View Post
hi
i am programming in graphics in C under linux. I am using curses.h.
the program is compiling without any error but when i run the error
"segmentation fault " results. After try to solve it i found that whenever i send any text on screen by using color or anything i get this error . plz help me as my project has stopped because of this.
How can anyone help you with this? You haven't posted your program, told us what it does, given any examples, or told us what version/distro of linux you're using, and only given us a generic error message.

The short answer is "your program is broken, fix it". Without you giving any other info, that's the best anyone can tell you.
 
Old 07-06-2009, 01:58 AM   #3
sarsah
LQ Newbie
 
Registered: Jun 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Unable to use <agvgl.h> in Red Hat Enterprise Linux WS

Quote:
Originally Posted by TB0ne View Post
How can anyone help you with this? You haven't posted your program, told us what it does, given any examples, or told us what version/distro of linux you're using, and only given us a generic error message.

The short answer is "your program is broken, fix it". Without you giving any other info, that's the best anyone can tell you.
Sir,
With respect to your comments quoted above I have been able to get rid of error message "segmentation fault" in my program.

Now, I am trying to use inbuilt functions for drawing circle, rectangle etc. which are there in header file <vgagl.h> and <vgl.h>. I am compiling my prog. with gcc compiler by the following command:
gcc -o exefilename filename.c -lcurses -lvgagl -lvgl

But every time it's generating an error message "vgagl.h:no such file or directory" with some other messages for undefined function of this header file. I am using Red Hat Enterprise Linux WS.Following is the sample code which I am compiling:

#include<stdio.h>
#include<vgagl.h>
#include<vgl.h>
#include<curses.h>
main()
{
initscr();
start_color();
gl_circle(200,200,15,COLOR_RED);
endwin();
getch();
return 0;
}
I have no idea about whether this header file is their or not in my distribution of Linux or I am unable to use it properly.

I don't know about the concerned Library also.

Please help me out.....

Last edited by sarsah; 07-06-2009 at 02:01 AM.
 
Old 07-06-2009, 07:34 AM   #4
r0b0
Member
 
Registered: Aug 2004
Location: Europe
Posts: 608

Rep: Reputation: 50
You need to install development packages of libraries you are going to compile with.

In this case it is probably svgalib-dev package.

R.
 
Old 07-06-2009, 07:53 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by sarsah
I have no idea about whether this header file is their or not in my distribution of Linux or I am unable to use it properly.
Perhaps use the "find" command to look for it?
Also, do a search using your package manager.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Graphics programming in gcc? vipul jain Programming 1 11-08-2008 07:27 AM
Graphics Programming lovelylinux Programming 7 04-24-2007 10:32 PM
Graphics programming lovelylinux Fedora 1 04-23-2007 08:05 AM
How to create more than 2000 threads inlinux 2.4kernel Agnello Programming 5 07-11-2006 09:12 AM
POSIX and Graphics programming in C varunnarang Programming 3 01-05-2005 09:27 AM


All times are GMT -5. The time now is 08:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration