473,569 Members | 2,536 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how can one resolve a linking problem in c graphics.h

Expand|Select|Wrap|Line Numbers
  1. void main()
  2. {
  3.     int gd=DETECT,gm;
  4.     initgraph(&gd,&gm,"c:\\tc\\bgi");
  5.     setcolor(GREEN);
  6.     settextstyle(4,0,8);
  7.     outtextxy(200,50,"TIME");
  8.     setcolor(YELLOW);
  9.     settextstyle(4,0,8);
  10.     outtextxy(100,190,"SCHEDULER");
  11.     settextstyle(1,0,1);
  12.     setcolor(RED);
  13.     outtextxy(480,350,"Made By:");
  14.     setcolor(BLUE);
  15.     outtextxy(480,370,"Atiq Anwar");
  16.     getch();
  17.     restorecrtmode();
  18. }
  19.  
  20.  
  21. error-
  22. linking error..undefined symbol setcolor
  23. linking error..undefined symbol settextstyle
  24. linking error..undefined symbol outtextxy
  25. linking error..undefined symbol restorecrtmode
  26. linking error..undefined symbol initgraph
  27.  
  28.  

plzzzzzz help thnx alot
Oct 24 '10 #1
2 4854
weaknessforcats
9,208 Recognized Expert Moderator Expert
For example, you are using a symbol setcolor and the compiler doesn't know what that is.

I don't know what that is either. Is a a variable? a function?

You cannot use any symbol unless you have first declared what it is.

Maybe you are missing a header file.

BTW: main() returns int not void.
Oct 24 '10 #2
donbock
2,426 Recognized Expert Top Contributor
This is a linker error, not a compiler error. That is, you are including the right header. This header promises the compiler that these functions exist and that they will be available for the link editor phase. However, the link editor can't find those functions so it complains that you broke your promise.

Typically, promised external functions like these are either provided in an object file or an object library. The method of providing either of these varies by compiler.

In gcc, you specify an object file by including it on the command line with all of the other input files; you specify an object library with the -l command line switch.
Oct 24 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1599
by: Pudibund | last post by:
Ok, I've spent nearly a week trying to sort what should be an easy task to accomplish but I'm totally flumoxed! I want to do something pretty simple... 1. display image1 2. wait until image1 is drawn to the screen
7
5087
by: Steven T. Hatton | last post by:
Is there anything that gives a good description of how source code is converted into a translation unit, then object code, and then linked. I'm particularly interested in understanding why putting normal functions in header files results in multiple definition errors even when include guards are used. -- STH Hatton's Law: "There is only...
2
1633
by: sb | last post by:
Hello. I have three files in a VC++6 project - a header file called Schedule.h, an implementation class called Schedule.cpp and a test class with main called TestSchedule1.cpp. It compiles fine in VC++ and in Unix, but when I run it in VC++ 6, I get several linking errors (55 to be exact). Can anyone tell me how to resolve this? Funny thing...
20
3203
by: Steven T. Hatton | last post by:
I just read this in the description of how C++ is supposed to be implemented: "All external object and function references are resolved. Library components are linked to satisfy external references to functions and objects not defined in the current translation. All such translator output is collected into a program image which contains...
2
2885
by: Simon Bitchenor | last post by:
I am linking an Access 97 front-end database to an ODBC data source (Sage Line 50 Version 9). Running the link on a Windows 98 PC the performance of the linked table is instant. Running under windows XP Professional the response increases to around 20-30 seconds. I have compared the ODBC settings on both operating systems and they seem...
5
1851
by: SJ | last post by:
Hi, I'd like to pu text fixed fith graphics and equations onto some control. And I don't know which one. I tried to use TRichEdit but its doesn't show graphics and eqation. How can I show these elements. It's best resolve for me. I thought that HTML format is good resolve as well(without equations, can be with??) but I don't know which...
2
3048
by: Nicholas Witchey | last post by:
Does anyone know of a set of graphics libraries written in C#? My goal is to create a set of graphics images in memory then dump them to a file or network stream in any format. Unfortunately the System.Drawing classes all resolve down to calls in gdiplus.dll which are implemented natively. Basically, I would like to use the...
2
7237
by: | last post by:
Help! I'm new to c++, and am breaking my teeth on MS Visual C++ (bundled within Visual Studio .NET 2003). Am trying to link simple c++ code to fortran dlls created in Compaq Visual Fortran (v6.1). Posts concerning this topic are common, but none of the posted solutions I've tried work correctly with the above software. The linker can't seem to...
7
6538
by: wmkew | last post by:
Hello everyone I'm encountering a R6002 Runtime error and several bugs when trying to generate a simple Managed C++ application with .NET 2003. The main problem seems to arise from linking with LIBCMT(D).DLL. (My requirement is that we can't link with MSVCRT(D).LIB.) Below are steps I've followed, and the resulting problems 1. Using the...
3
4365
by: walkeraj | last post by:
I'm trying to compile an open source game called IVAN , and I'm able to compile it from a makefile, but not from an IDE. I have attempted to recreate the way the makefile compiles the project as closely as possible, yet I'm getting odd linking errors. I think I've traced it to some kind of problem with the SDL libraries it uses, yet I can't...
0
7700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7614
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8125
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7676
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.