Jump to content
rair

Ajutor

Recommended Posts

Am instalat dev-c++ si am incercat urmatorul cod care ar trebui sa afiseze un cerc:

#include <graphics.h>

int main(void)
{
int a=0,b;
initgraph(&a,&b,"d:\\borlandc\\bgi");
circle(100,100,20);
}

Problema este ca nu merge.Da eroarea:

graphics.h: No such file or directory.

Asa si este, am cautat in dev-c++ si nu are graphics.h .

Ce sa fac?

Link to comment
Share on other sites

@tw8 am luat graphics.h de unde ai zis si a mers include da acum apare alta eroare.

Am deschis un proiect nou, o foaie noua si am facut setarile la optiuni proiect exact cum zice in linkul dat de tine: am pus la parametri-> editor de legaturi :

-lbgi

-lgdi32

-lcomdlg32

-luuid

-loleaut32

-lole32

si am scris urmatorul cod:

#include <graphics.h>

using namespace std;

int main()
{
initwindow(800,600);
circle(200,300,600);
while(!kbhit());
closegraph();
return 0;
}

Cand dau compilare da eroarea:

cannot find -lbgi

Creca este o eroare la setarile facute de mine :(

Daca nu pun nimic la optiuni proiect parametri-> editor de legaturi

da eroarea :

[Linker error] undefined reference to `initwindow'

[Linker error] undefined reference to `circle'

[Linker error] undefined reference to `closegraph'

Sper sa ma poti ajuta...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...