tags:

views:

246

answers:

4

sir,

In my turbo c++ program, I can't run any of the graphics program. When it compile, it shows the error's like:

undefined symbol _line, _closegraph,_ getmaxx etc...

Is it due to the settings of my c-program?

A: 

Those errors are typical of a missing library in your build. Try linking the appropriate libraries and rebuild the solution (most likely graphics.lib).

-John

John T
How are so sure that it's not missing headerfile, i.e. not a compile error but a linker error?
Chandan .
+1  A: 

It's compile error and not link error. Looks like "graphics.h" is missing.

Do

#include "graphics.h"
Chandan .
an undefined symbol can very well be a link error
John T
The question clearly says 'when i tried to compile'. In turbo c++ compiler, it does not list link errors pertaining to missing library during compile-time. So I said missing headerfile. Whats wrong with that? And why negative?
Chandan .
A: 

Please do both of the above.

Alphaneo
+3  A: 

Is this an old program that was written for Turbo C++, and that you're trying to compile with a modern compiler? If so, it might be the case that the program uses compiler-specific extensions and libraries, that are simply not available in the compiler you're using now.

If that is the case, you must either

  • find an existing library for your current environment that emulates the old Turbo C++ one, or
  • find out exactly what each call is supposed to do, and change the code to use something that your environment supports.
unwind
+1 , at least one sane answer :)
Tim Post