Linker Error En Turbo C
module It means that you have not enabled the graphics library for linking. By default this setting is
Linker Error Undefined Symbol _printf In Module
OFF when you install Turbo C++ version 3.0. All you need to do is, from turbo c++ menu, goto Options -> Linker -> Libraries... and check the Graphics Library option Disclaimer: This web site is for educational and informational purposes only. Click here to read the Disclaimer. Content copyright 2010-2015. Betelgeuse LLC. All rights reserved.
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us
Bgi Error Graphics Not Initialized
Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community how to remove linking error in c Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Linker undefined symbol error in turbo c error in C. while using Turbo C++ up vote 4 down vote favorite 1 I have entered the following code in turbo c++. #include #include int main() { int gd= DETECT, gm; initgraph(&gd,&gm,"D:\\TC\\BGI"); getch(); closegraph(); return 0; } It compiles without http://www.softwareandfinance.com/Turbo_C/Graphics_initgraph.html any errors and warning. But when I run the program the following errors are displayed Linker Error: Undefined symbol_closegraph in module G1.C Linker Error: Undefined symbol_initgraph in module G1.C note : The BGI folder is in the path D:\TC\ How can I solve the problem, please help me so I could begin useing graphics in C. c++ c linker turboc++ share|improve this question edited Jan 14 '14 at 10:34 asked Jan 14 '14 at 10:23 MELWIN 4082717 3 You need to link against graphics.lib, http://stackoverflow.com/questions/21111065/linker-error-in-c-while-using-graphics-h-turbo-c and you should probably consider switching to a more recent compiler –Andreas Fester Jan 14 '14 at 10:27 Please edit the title and add Turbo C to it. –adrin Jan 14 '14 at 10:31 thankyou. editted –MELWIN Jan 14 '14 at 10:36 add a comment| 1 Answer 1 active oldest votes up vote 5 down vote accepted If you are using Turbo C .. just need to check one option: Go to Options->Linker->Libraries and check the Graphics Library option share|improve this answer edited Oct 7 '15 at 16:22 Morgan Thrapp 5,61021946 answered Jan 14 '14 at 10:26 Digital_Reality 3,1221916 3 hahahaha, love that you remember this, lol. Apparently people still use TC, Borland should be proud :P –adrin Jan 14 '14 at 10:31 @adrin yeah.. stopped using this now but I know I too got trouble using it :D –Digital_Reality Jan 14 '14 at 10:32 @Digital_Reality:sad no one find this question useful... :( thank you for the answer sir :) –MELWIN Jan 14 '14 at 10:39 @Digital_Reality sir in output i got the message " Graphics not initialized use ('initgraph') . What should I do ??? –MELWIN Jan 14 '14 at 10:43 @MELWIN Err.. time changes buddy! :) We have to stick to it.. Anyway when are you moving to new compiler? :D –Digital_Reality Jan 14 '14 at 10:44 | show 1 more comment Your Answer draft saved draft discarded Sign up or log in Sign up using Go
Programming Boards C++ Programming Problem with BGI graphics: Linker Error Getting started with C or C++ | C Tutorial | C++ Tutorial | C and C++ http://cboard.cprogramming.com/cplusplus-programming/68172-problem-bgi-graphics-linker-error.html FAQ | Get a compiler | Fixes for common problems Thread: Problem with BGI graphics: Linker Error Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 07-28-2005 #1 darklord1984 View Profile View Forum Posts Registered User Join Date Jul 2005 Posts 9 Problem with BGI graphics: Linker Error Hey. I had just started work linker error on a certain BGI graphics mini project, when I discovered a totally new problem. Whenever I try to compile the program below, it gets compiled with no errors and no warnings. However, when I try to run the program, I get linker errors related to each of the functions defined in graphics.h Code: #include #include #include #include #define XINTERVAL 100 ///////////////////////////////////////////////////////////////////// void showgraph() { int gd=DETECT,gm,currentx,ctr,ctr2; clrscr(); error in c initgraph(&gd,&gm,"c:\\tc\\bgi"); cleardevice(); moveto(1,1); currentx=1; setcolor(BLUE); ctr2=0; ctr=1; while(getx()<=getmaxx()) { line(currentx,1,currentx,getmaxy()); ctr++; currentx=XINTERVAL*ctr2+log10(ctr)*XINTERVAL; if(ctr==10) { ctr=1; ctr2++; } } getch(); closegraph(); restorecrtmode(); } ///////////////////////////////////////////////////////////////////// int main() { clrscr(); showgraph(); getch(); return(0); } The program seems simple enough, so I am unable to understand why I should get any errors at all. The problem is that I am writing a BGI graphics program after a very long time, and did not anticipate any problem. Moreover, programs that I had earlier written and compiled correctly, now give me the same errors when I try to run them from within the compiler. What could be the problem? Please help out. Compiler: Turbo C++ v3.0 OS: Microsoft Windows XP, Home Edition, Version 2002, Service Pack 2 Computer: AMD Athlon XP 2000+, 1.66 GHz, 224 MB RAM Last edited by darklord1984; 07-28-2005 at 03:07 PM. 07-28-2005 #2 dwks View Profile View Forum Posts Visit Homepage Frequently Quite Prolix Join Date Apr 2005 Location Canada Posts 8,055 Perhaps you have to link the library for the BGI to your program? Maybe under "Compiler options"? programs that I had earlier written and compiled correctly, now give me the same errors when I try to run them from within the