Thread: how to include a graphic.h header file in ubuntu

  1. #1
    Registered User
    Join Date
    Oct 2013
    Location
    Washington
    Posts
    1

    how to include a graphic.h header file in ubuntu

    Hi All;

    I want to make a computer graphic project using C++ in Ubuntu. I am naïve about C++ programming, I am in a beginner state. I tried compiling my projects using g++ compiler, but get errors since its not able find the graphic.h file in the include folder. I browsed and found that downloading the libgraph files will help. So I did it. I now have graphic.h file in other folder not in the include folder.

    I want to know, how can pass the path of the graphic.h file to the compiler. So that it can find it.(I mean necessary change to be done to the .cpp file or to the command to be typed).

    I am open to any better suggestions, since I read that graphic.h is an absolute way of graphic object development in C++.

  2. #2
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    I believe "graphics.h" is generally for Windows, and terribly outdated. Have you considered using other libraries, such as ncurses or SDL?

  3. #3
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    Header files generally contain typedefs, macros and function prototypes. The actual code for whatever might be implemented by what is described in the graphics.h header file will exist in a compiled library somewhere. Just transporting the header file over to a machine will not allow you to compile/link your program, you must also transport this library file as well. Then there is the issue of whether or not your destination environment can even work with the format of the library file from the source machine. In short, moving a header file will rarely get you what you want.
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 02-10-2009, 02:51 PM
  2. cant include libipq.h header file
    By rohit83.ken in forum C Programming
    Replies: 3
    Last Post: 04-04-2008, 02:41 AM
  3. Header file include order
    By cunnus88 in forum C++ Programming
    Replies: 6
    Last Post: 05-17-2006, 03:22 PM
  4. Where can i add a header file other than include directory
    By asdfasdfasdf in forum C++ Programming
    Replies: 4
    Last Post: 09-26-2002, 07:23 AM
  5. Header file include guards
    By foniks munkee in forum C Programming
    Replies: 4
    Last Post: 03-22-2002, 12:33 AM