writing graphics program

General questions regarding the usage of CodeLite
zinat2688
CodeLite Curious
Posts: 6
Joined: Tue Feb 04, 2014 9:27 am
Genuine User: Yes
IDE Question: c++
Contact:

writing graphics program

Post by zinat2688 »

How and where to write a graphics program in codelite??
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: writing graphics program

Post 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
Make sure you have read the HOW TO POST thread
zinat2688
CodeLite Curious
Posts: 6
Joined: Tue Feb 04, 2014 9:27 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: writing graphics program

Post 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
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: writing graphics program

Post 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
Make sure you have read the HOW TO POST thread
zinat2688
CodeLite Curious
Posts: 6
Joined: Tue Feb 04, 2014 9:27 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: writing graphics program

Post by zinat2688 »

it gives the following error:

error: undefined reference to 'initgraph'
error: undefined reference to 'line'
error: undefined reference to 'delay'
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: writing graphics program

Post by eranif »

You need to add the graphics library to the linker:

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


Eran
Make sure you have read the HOW TO POST thread
zinat2688
CodeLite Curious
Posts: 6
Joined: Tue Feb 04, 2014 9:27 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: writing graphics program

Post by zinat2688 »

can u specify what exactly i need to do
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: writing graphics program

Post 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
Make sure you have read the HOW TO POST thread
zinat2688
CodeLite Curious
Posts: 6
Joined: Tue Feb 04, 2014 9:27 am
Genuine User: Yes
IDE Question: c++
Contact:

Re: writing graphics program

Post 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
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: writing graphics program

Post by eranif »

which codelite version are you using?

Eran
Make sure you have read the HOW TO POST thread
Post Reply