473,856 Members | 1,595 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 4879
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
1621
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
5131
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 One inviolable Law" KDevelop: http://www.kdevelop.org SuSE: http://www.suse.com Mozilla:...
2
1642
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 is, someone showed me how to resolve this like a year ago and it was pretty simple, but I've...
20
3248
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 information needed for execution in its execution environment." What I'm wondering is what exactly...
2
2895
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 identical. The windows XP PCs are all Celerons 2.0Ghz+ with 512Mb RAM, the windows 98 PC is a 1Ghz AMD...
5
1879
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 control should I use to show HTML page. Links, documentation, anything
2
3060
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 System.Drawing namespace, classes, and methods to manipulate bitmaps in memory but not have any fundamental...
2
7264
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 find the dll (reports 'unresolved external symbol __imp__IMSL_FUN@8'; IMSL_FUN.dll is the f77...
7
6560
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 New Project wizard, generate a Visual C++ .NET Class Library project (call it "Doomed") and a VC++...
3
4378
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 explain why it will compile from the makefile and not from the IDE. I have made sure that the ide...
0
9763
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10697
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9532
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7932
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7097
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5762
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5959
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4578
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3202
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.