Page 1 of 2

writing graphics program

Posted: Tue Feb 04, 2014 9:30 am
by zinat2688
How and where to write a graphics program in codelite??

Re: writing graphics program

Posted: Tue Feb 04, 2014 10:36 am
by eranif
This a very generic question.
Do you mean GUI application?

There are several ways to do it, but you need to provide more information on what you want to achieve
On your OS, codelite version etc

Eran

Re: writing graphics program

Posted: Tue Feb 04, 2014 1:05 pm
by zinat2688
i want to write a basic graphics program in codelite lyk this :

Code: Select all

#include <stdio . h>
#include <graphics . h>
int main ()
{
int gd ,gm; gd=DETECT;
initgraph(&gd,&gm,NULL) ;
line (50 ,50 ,80 ,80) ;
delay (5000) ;
return 0;
}
M using Ubuntu 12.04 and codelite version v2.8.0.4537

Re: writing graphics program

Posted: Tue Feb 04, 2014 1:16 pm
by eranif
zinat2688 wrote:i want to write a basic graphics program in codelite lyk this :
I dont see the problem here

Please explain in simple words what is the problem.
Also, make sure you read this post HOW TO POST
zinat2688 wrote:M using Ubuntu 12.04 and codelite version v2.8.0.4537
This is an ancient version of codelite which is no longer supported by us (and it was not packaged by the codelite team)
You should update to a recent version (current release is 5.4) from our website http://codelite.org

Eran

Re: writing graphics program

Posted: Tue Feb 04, 2014 1:55 pm
by zinat2688
it gives the following error:

error: undefined reference to 'initgraph'
error: undefined reference to 'line'
error: undefined reference to 'delay'

Re: writing graphics program

Posted: Tue Feb 04, 2014 5:56 pm
by eranif
You need to add the graphics library to the linker:

project settings->common settings->linker->libraries


Eran

Re: writing graphics program

Posted: Wed Feb 05, 2014 9:19 am
by zinat2688
can u specify what exactly i need to do

Re: writing graphics program

Posted: Wed Feb 05, 2014 10:11 am
by eranif
zinat2688 wrote:can u specify what exactly i need to do
This is not related to codelite. I suggest that you google that

Eran

Re: writing graphics program

Posted: Wed Feb 05, 2014 1:39 pm
by zinat2688
Running program: /usr/lib/codelite/codelite_xterm './test ' '/bin/sh -f /usr/lib/codelite/codelite_exec ./test '

after doing the setting and running the program it gives the above thing and no output

Re: writing graphics program

Posted: Wed Feb 05, 2014 1:54 pm
by eranif
which codelite version are you using?

Eran