Author Topic: missing header files  (Read 8788 times)

kaloxy

  • Guest
missing header files
« on: April 20, 2009, 10:56:49 am »
Hi

I just installed Code::Blocks, and i am just learning how to code ... however this simple code below gives erros ....

#include <stdio.h>
#include <graphics.h>
#include <conio.h>

int main()
{
   
    return 0;
}

coddeblocks graphics.h: No such file or directory|

How can i resolve this and such futures header files i may need.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: missing header files
« Reply #1 on: April 20, 2009, 11:22:34 am »
coddeblocks graphics.h: No such file or directory|
- get the SDK's you need (those who provide the header and probably library files)
- install / extract the files to a place as you like
- setup the include path's for the compiler and linker correctly in your project options

BTW: graphics.h is not a default C/C++ include file. I don't know what framework it belongs to - you need to figure out yourself. C::B cannot and will not ship with each and every framework (as every other IDE does not, too). It just provided you with the MinGW/GCC compilers and files.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: missing header files
« Reply #2 on: April 20, 2009, 01:09:13 pm »
graphics.h is an old Borland Turbo C++ or Borland C++ header file support graphics in MS-DOS.

Also, someone has created a version for running in windows. You can search it by Google.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline saidus

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: missing header files
« Reply #3 on: April 23, 2009, 12:13:11 pm »
Code
#include <graphics.h>
#include <conio.h>
are the TCC header from borland
i think you can find what u are seeking in this site
http://www.delorie.com/djgpp/
 :D