[C] - Graphics library
[C] - Graphics library
[C] - Graphics library
[C] - Graphics library
[C] - Graphics library
[C] - Graphics library [C] - Graphics library [C] - Graphics library [C] - Graphics library [C] - Graphics library [C] - Graphics library [C] - Graphics library [C] - Graphics library
[C] - Graphics library [C] - Graphics library
[C] - Graphics library
Go Back  Xtreme Visual Basic Talk > > > [C] - Graphics library


Reply
 
Thread Tools Display Modes
  #1  
Old 02-17-2013, 02:25 PM
Cambalinho_83's Avatar
Cambalinho_83 Cambalinho_83 is offline
Senior Contributor
 
Join Date: Feb 2008
Location: somewhere in space
Posts: 1,296
Default [C] - Graphics library


why i can't use graphics. in VC++6(98)?
Code:
/* Sample program to draw a circle*/
#include<graphics.h>
#include<conio.h>
void main()
{
  int gd=DETECT,gm;
  initgraph(&gd,&gm,""); /* initialization of graphic mode */
  circle(150,150,100);
  getch();
  closegraph(); /* Restore orignal screen mode */
}
/* End of program */
i tested these program but i get these errors:
"--------------------Configuration: test2 - Win32 Debug--------------------
Compiling...
test.cpp
Linking...
test.obj : error LNK2001: unresolved external symbol _closegraph
test.obj : error LNK2001: unresolved external symbol _circle
test.obj : error LNK2001: unresolved external symbol _initgraph
Debug/test2.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.

test2.exe - 4 error(s), 0 warning(s)"
can anyone advice me?
thanks
Reply With Quote
  #2  
Old 02-19-2013, 10:31 PM
passel's Avatar
passel[C] - Graphics library passel is offline
Sinecure Expert

Super Moderator
* Guru *
 
Join Date: Jun 2003
Location: Upstate New York, usa
Posts: 8,023
Default

If you're going to use VC++ 6.0 then get documentation for VC++ 6.0.
The code you posted looks like old Turbo C++ code, from DOS or early Windows 3.1 days.
VC++ 6 does not have a library that uses a graphics.h header file.

Probably the closest library to the level of graphics.h would be, I think, graph.h to access the GDI functions of windows.
But the last pre .net version of VC++ I have is 5.0, and I'm not even sure where that is at the moment.
The majority of the little C++ I've done has been on Unix based machines, not windows, and usually involved higher level graphic libraries, such as GL (pre-OpenGL) and QT.
__________________
There Is An Island Of Opportunity In The Middle of Every Difficulty.
Miss That, Though, And You're Pretty Much Doomed.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
[C] - Graphics library
[C] - Graphics library
[C] - Graphics library [C] - Graphics library
[C] - Graphics library
[C] - Graphics library
[C] - Graphics library [C] - Graphics library [C] - Graphics library [C] - Graphics library [C] - Graphics library [C] - Graphics library [C] - Graphics library
[C] - Graphics library
[C] - Graphics library
 
[C] - Graphics library
[C] - Graphics library
 
-->