Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: C compiler, graph.h.  (Read 18596 times)

0 Members and 1 Guest are viewing this topic.

Boozu

    Topic Starter


    Hopeful

    Thanked: 9
    • Yes
    • Yes
  • Certifications: List
  • Experience: Familiar
  • OS: Windows 10
C compiler, graph.h.
« on: April 10, 2010, 01:30:11 AM »
I have a C compiler that is nice and simple and the only problem is that it wont compile in a 64 bit environment. Since my main computer is 64 bit I run a VM of 32 bit xp. That was fine until I decided to start a big project and realised just how slow the VM was.

I looked for and found many compilers that would work, however they all had the same problem. Non of them had the graph.h include file. I am using the _settextposition comand and as I understand it that is connected to the graph.h file.

Can anyone tell me of a compiler that for sure has  that file or tell me how to add that file. I tried copy/pasting it into the include folder but it would not work.

Thanks.
Don't worry about it.  If it's not good at stock, then it's not good.


Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: C compiler, graph.h.
« Reply #1 on: April 10, 2010, 01:59:39 AM »
Did you try a Google search?
Graph.h is a DOS graphics header.
Look on this site:
http://www.koders.com/

ghostdog74



    Specialist

    Thanked: 27
    Re: C compiler, graph.h.
    « Reply #2 on: April 10, 2010, 02:04:19 AM »
    Just curious. What is the project that you are working on. ? A C/C++ game?

    Boozu

      Topic Starter


      Hopeful

      Thanked: 9
      • Yes
      • Yes
    • Certifications: List
    • Experience: Familiar
    • OS: Windows 10
    Re: C compiler, graph.h.
    « Reply #3 on: April 10, 2010, 02:21:22 AM »
    Did you try a Google search?
    For graph.h? yes.
    Look on this site:
    http://www.koders.com/
    What am I looking for?

    Just curious. What is the project that you are working on. ? A C/C++ game?
    Yes a game.
    Don't worry about it.  If it's not good at stock, then it's not good.


    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: C compiler, graph.h.
    « Reply #4 on: April 10, 2010, 08:35:56 AM »
    "graph.h" is a DOS legacy include file...
    I was trying to dereference Null Pointers before it was cool.

    Boozu

      Topic Starter


      Hopeful

      Thanked: 9
      • Yes
      • Yes
    • Certifications: List
    • Experience: Familiar
    • OS: Windows 10
    Re: C compiler, graph.h.
    « Reply #5 on: April 10, 2010, 01:45:42 PM »
    "graph.h" is a DOS legacy include file...
    But what does that mean? Is there another way to use the _settextposition(x,y); comand?
    Don't worry about it.  If it's not good at stock, then it's not good.


    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: C compiler, graph.h.
    « Reply #6 on: April 10, 2010, 03:26:30 PM »
    Quote
    Look on this site:
    http://www.koders.com/
    What am I looking for?
    Sorry, I though you would know to search there and find it.
    Newer programs no longer user graph.h    or at least no the version mentioned here.
    The site mentioned above gives the contents of that file, which are rather long. You may wish to edit parts of that file. On just use what you need.
    The Borland C++ compiler is now free and has alternatives to that file.
    http://edn.embarcadero.com/article/20633
    (Just one of many)

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: C compiler, graph.h.
    « Reply #7 on: April 10, 2010, 07:00:50 PM »
    But what does that mean? Is there another way to use the _settextposition(x,y); comand?

    I don't know any alternatives, but what you've been creating have been DOS programs, which simply will not work on a 64-bit OS.
    I was trying to dereference Null Pointers before it was cool.

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: C compiler, graph.h.
    « Reply #8 on: April 10, 2010, 08:09:22 PM »
    Right. Can't use graph.h  it is Deprecated.
    He will have to re work over some things in the code
    Example:
    Quote
    static void CGContextSetTextPosition(
       IntPtr context,
       float x,
       float y
    )
    Instead of the _settextposition thing.

    Boozu

      Topic Starter


      Hopeful

      Thanked: 9
      • Yes
      • Yes
    • Certifications: List
    • Experience: Familiar
    • OS: Windows 10
    Re: C compiler, graph.h.
    « Reply #9 on: April 10, 2010, 08:43:19 PM »
    Interesting. Can anyone explain why my instructor told me that we were learning C? I may have misunderstood and will ask him next time I see him.

    Their is absolutely no way to run it in a 64 bit environment? If not then what other differences are their between C and dos?

    Thanks.
    Don't worry about it.  If it's not good at stock, then it's not good.


    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: C compiler, graph.h.
    « Reply #10 on: April 11, 2010, 08:57:55 AM »
    Interesting. Can anyone explain why my instructor told me that we were learning C? I may have misunderstood and will ask him next time I see him.

    Their is absolutely no way to run it in a 64 bit environment? If not then what other differences are their between C and dos?

    Thanks.

    C is a programming language. it can be compiled to any Operating system.

    my point was that graph.h will <only> compile and work with DOS.
    I was trying to dereference Null Pointers before it was cool.

    Boozu

      Topic Starter


      Hopeful

      Thanked: 9
      • Yes
      • Yes
    • Certifications: List
    • Experience: Familiar
    • OS: Windows 10
    Re: C compiler, graph.h.
    « Reply #11 on: April 11, 2010, 03:18:22 PM »
    C is a programming language. it can be compiled to any Operating system.

    my point was that graph.h will <only> compile and work with DOS.
    Sorry I meant are there any other things like graph.h that are not in C. and most importantly any syntactual differences.
    Don't worry about it.  If it's not good at stock, then it's not good.


    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: C compiler, graph.h.
    « Reply #12 on: April 11, 2010, 07:43:37 PM »
    Sorry I meant are there any other things like graph.h that are not in C. and most importantly any syntactual differences.

    What?
    I was trying to dereference Null Pointers before it was cool.

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: C compiler, graph.h.
    « Reply #13 on: April 11, 2010, 08:52:43 PM »
    He was told that C is a universal progrtamming tool and that it is cross platfrom.
    Which is true.
    But specific system level programs become very specific to an OS.
    You can have a C program running in a Windows 98 environment that will crash when run on a Windows 2000 PC. It is the API that is not exactly the same.

    And this problem is not just with C. Any system program that has to get down in to the low-level stuff for speed will be very specific to the environment.

    Nor is it a problem just with Windows. Other OS also, to some,degree, change with the version numbers. An early version of Linux has a library that differs from a newer version. Bad enough to crash.

    We are still a long way away from a universal way to code for all platforms. Still, if you want to do system level programming, you have to study some C and its newer forms, like C++

    Then there is C#, but...
     I am still learning Cb.  :P


    Boozu

      Topic Starter


      Hopeful

      Thanked: 9
      • Yes
      • Yes
    • Certifications: List
    • Experience: Familiar
    • OS: Windows 10
    Re: C compiler, graph.h.
    « Reply #14 on: April 11, 2010, 10:37:03 PM »
    I see.

    We are still a long way away from a universal way to code for all platforms.

    I bout that day will ever come. Manly because people lose money, but more importantly because if all OS and/or there systems are built on the same "code" then all computers would be at risk of every virus.
    Don't worry about it.  If it's not good at stock, then it's not good.