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 18588 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.


    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 #15 on: April 11, 2010, 10:40:10 PM »
    Java can be run on nearly every platform with only minor changes... C#, F#, VB.NET, and managed C++ can run on Windows and Linux, as well.

    Although I don't think you can use anything in the System.Windows namespace on Mono...
    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 #16 on: April 11, 2010, 11:14:32 PM »
    Quote
    "code" then all computers would be at risk of every virus.

    This idea has some merit.
    However, it is not enough reason to have many kinds of OS.
    It is very possible to put up resistance to a virus with just one OS. The  one OS can have several 'strains", not mutations, rather variations in the low-level structure which would make it hard for a virus to identify the build of the OS.

    Windows, as well as other OS, already hae DLL programs. This can be extended to that a hostile program can not 'crack' the DLL, it a proper program would have no problem with the DILL.  The hostile code wants to find a weak sport inside the DLL. The friendly program only wants to use the DLL, not pick it apart.

    Microsoft has already hinted they may do something that that in the future. Thus you will have hundreds  of different 'builds' for just one release of Windows, All the API is the same. Just he binaries vary in some detail. Enough to make it very had for a virus to attach itself to a bit of code without bringing the system down.
    Is this off topic? Well, I am trying to say that just as you can have many flavors of Linux, that can also be done with Windows without really making any visible changes. Which is even better.

    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 #17 on: April 11, 2010, 11:22:21 PM »
    This idea has some merit.
    However, it is not enough reason to have many kinds of OS.
    It is very possible to put up resistance to a virus with just one OS. The  one OS can have several 'strains", not mutations, rather variations in the low-level structure which would make it hard for a virus to identify the build of the OS.

    Windows, as well as other OS, already hae DLL programs. This can be extended to that a hostile program can not 'crack' the DLL,

    err...

    a DLL is an In-process library. It's loaded in the same process as the caller. malware doesn't change this.

    What malware does is install a global hook on  certain DLL functions, for example, they usually hook CreateFile and other file access functions to hide files. AV programs do this too to detect when a f ile is being opened.

    There is no "weak spot" in a dll. it's in process; you load it, and it belongs to your process. the DLL allocates data in <your> address space. it uses <your> stack, it uses <your> heap. It uses <your> process memory so you can do what you please with it, including changing jumps and ordinals.

    Most "hook" malware is written via a early-loaded DLL, often a winlogon notify hook. this sets it up so that every process will be implicitly bound to a malware-designed DLL, which, when it's DllMain() is called, can hook the functions that would otherwise go to kernel32 or user32 or whatever and do what it pleases with them instead.

    Quote
    rather variations in the low-level structure which would make it hard for a virus to identify the build of the OS.

    That's ridiculous. the very same "variations" and randomness that would make malware writing difficult also makes diagnostic utilities and process analysis difficult.  What we need is a better heuristic that can better detect malicious use of those functions, not obscurity of those functions.



    it a proper program would have no problem with the DILL.  The hostile code wants to find a weak sport inside the DLL. The friendly program only wants to use the DLL, not pick it apart.

    Microsoft has already hinted they may do something that that in the future. Thus you will have hundreds  of different 'builds' for just one release of Windows, All the API is the same. Just he binaries vary in some detail. Enough to make it very had for a virus to attach itself to a bit of code without bringing the system down.
    Is this off topic? Well, I am trying to say that just as you can have many flavors of Linux, that can also be done with Windows without really making any visible changes. Which is even better.

    [/quote]
    I was trying to dereference Null Pointers before it was cool.

    rthompson80819



      Specialist

      Thanked: 94
    • Experience: Experienced
    • OS: Windows 7
    Re: C compiler, graph.h.
    « Reply #18 on: April 11, 2010, 11:39:10 PM »
    it a proper program would have no problem with the DILL.

    There's the problem.  Somebody has a pickle in their compiler.

    Boozu

      Topic Starter


      Hopeful

      Thanked: 9
      • Yes
      • Yes
    • Certifications: List
    • Experience: Familiar
    • OS: Windows 10
    Re: C compiler, graph.h.
    « Reply #19 on: April 12, 2010, 03:13:42 AM »
    There's the problem.  Somebody has a pickle in their compiler.

    A pickle?
    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 #20 on: April 12, 2010, 01:18:44 PM »
    WARNING. Do NOT search on 'Pickle Compiler' as those keywords lead to sites that will infect your system. Do NOT use the pickle library unless you know exactly what it is.

    Boozu

      Topic Starter


      Hopeful

      Thanked: 9
      • Yes
      • Yes
    • Certifications: List
    • Experience: Familiar
    • OS: Windows 10
    Re: C compiler, graph.h.
    « Reply #21 on: April 12, 2010, 05:17:09 PM »
    WARNING. Do NOT search on 'Pickle Compiler' as those keywords lead to sites that will infect your system. Do NOT use the pickle library unless you know exactly what it is.
    It is a good thing I have a backup plan. HAHA.

    What is the deal with this pickle compiler/bad for computer thing?
    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 #22 on: April 12, 2010, 05:21:01 PM »
    What is the deal with this pickle compiler/bad for computer thing?

    I have absolutely no idea. I know rthompson mentioned it because of a typo in one of geek's posts. (dill)
    I was trying to dereference Null Pointers before it was cool.

    rthompson80819



      Specialist

      Thanked: 94
    • Experience: Experienced
    • OS: Windows 7
    Re: C compiler, graph.h.
    « Reply #23 on: April 12, 2010, 05:24:37 PM »
    Lame joke, sorry.

    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 #24 on: April 12, 2010, 06:23:31 PM »
    Here a safe place to dload pickle for C++
    http://linux.softpedia.com/get/Programming/Widgets/Perl-Modules/Pickle-55831.shtml   :-[
    We are talking about Linux  -Right?
    Just be careful about where you get Pickle.

    Boozu

      Topic Starter


      Hopeful

      Thanked: 9
      • Yes
      • Yes
    • Certifications: List
    • Experience: Familiar
    • OS: Windows 10
    Re: C compiler, graph.h.
    « Reply #25 on: April 14, 2010, 01:49:10 AM »
    Geek-9pm you mentioned:
    static void CGContextSetTextPosition(
       IntPtr context,
       float x,
       float y
    )

    Can you please elaborate? I have stared building my program in a proper C compiler so I need a new way to set x,y coordinates.
    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 #26 on: April 14, 2010, 02:13:42 AM »
    Geek-9pm you mentioned:
    static void CGContextSetTextPosition(
       IntPtr context,
       float x,
       float y
    )

    I have stared building my program in a proper C compiler

    Well, I can tell you right off that that segment of code geek said is C#, not C.
    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 #27 on: April 14, 2010, 02:18:41 AM »
    k. There must be some way of setting x,y in C. I have googled the *censored* out of it and I am not finding anything.
    Don't worry about it.  If it's not good at stock, then it's not good.