Thread: Compiler Installation

  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    7

    Unhappy Compiler Installation

    Hey everyone,

    While technically not a C programming question I wondered if you guys had any ideas about the solution to a problem I'm having. I'm currently in the process of installing a new compiler (djgpp). I've followed their installation instructions yet every time I go to compile (i.e type into DOS gcc hello.c -o hello.exe) I get this error:

    Code:
    16 bit MS-DOS Subsystem
    
    C:\WINDOWS\system32\cmd.exe - gcc hello.c -o hello.exe
    C:\WINDOWS\SYSTEM32\AUTOEXEC.NT.  The system file is not suitable for running MS-DOS and Windows applications.
    Have I missed something REALLY obvious?

    Cheers,

    T

  2. #2
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002
    Posts
    638
    in the c:\ prompt have you tried

    C:\> gcc hello.c

  3. #3
    Fountain of knowledge.
    Join Date
    May 2006
    Posts
    794
    Hi I recently installed that compiler but it would not work for a different
    reason (DJGCC.env corrupt error when I ran the program) however that
    appears to be a problem with the stuff I downloaded having an error
    somewhere (apparently DJGCC was spelt DGJCC somewhere).
    Anyway I had the compiler installed on my old computer so I just
    copied that stuff across and it worked fine.

    Anyway I would compile as follows:-
    gcc poker.c -o poker.exe -lm



    Also I am unsure what is going on, what is cmd.exe?

    It also looks like you change to directory AUTOEXEC.NT. somehow?
    Confusing.

    Anyway what operating system do you have?
    It looks like it has a windows NT file there, do you have windows NT?
    Maybe you downloaded a NT version in error?

  4. #4
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    I think you downloaded the wrong version of DJGPP. I know the Windows 98 version doesn't run under Windows XP.

    Download it again at http://www.delorie.com/djgpp/
    [edit] And use the ZIP Picker. [/edit]
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  5. #5
    Fountain of knowledge.
    Join Date
    May 2006
    Posts
    794
    Quote Originally Posted by dwks
    I think you downloaded the wrong version of DJGPP. I know the Windows 98 version doesn't run under Windows XP.

    Download it again at http://www.delorie.com/djgpp/
    [edit] And use the ZIP Picker. [/edit]

    Thats exactly where I downloaded it from and I used ZIP
    picker. The default values were basically all correct for
    me so all I had to do was click the button.
    Anyway it would not work, it has a bug with the
    DJGCC.env file(name), there is an old post in these
    forums which describes the bug.
    http://cboard.cprogramming.com/showt...oto=nextnewest
    I had exactly the same problem, maybe somehow it
    got the wrong version from a mirror site?

    You may know the Windows 98 version doesn't run under Windows XP, however it did for me because that is what I
    am running now!! I copied the files from my old computer
    which runs W98. I think basically it should work on all
    windows platforms. Anyway the old version works fine
    for me so I won't be changing it for the time being.
    Also the old version is the same version numer as the new one.
    Version 2.03, however it is different (different size).

    Also the bug is describe here as fixed. (3rd bug down)

    http://www.delorie.com/djgpp/bugs/list-fixed.cgi

    Unclear if the fix is released.

  6. #6
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    . . . my Windows 98 version is 1.5 so that might explain it.

    What's in your AUTOEXEC.BAT file? It should have at least this line
    Code:
    set DJGPP=C:\DJGPP\DJGPP.ENV
    and probably
    Code:
    set PATH=%PATH%;C:\DJGPP\BIN
    or whereever you installed it.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  7. #7
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  8. #8
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    (DJGCC.env corrupt error when I ran the program)
    Okay, you definitely have a problem with your AUTOEXEC.BAT file. As indicated, add a set DJGPP line, or try this (assuming DJGPP is installed in C:\DJGPP):
    Code:
    C:\djgpp>set DJGPP=C:\DJGPP\DJGPP.ENV
    
    C:\djgpp>set PATH=%PATH%;C:\DJGPP\bin
    
    C:\djgpp>rhide
    This is RHIDE version 1.5 ....
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  9. #9
    Fountain of knowledge.
    Join Date
    May 2006
    Posts
    794
    Quote Originally Posted by dwks
    . . . my Windows 98 version is 1.5 so that might explain it.

    What's in your AUTOEXEC.BAT file? It should have at least this line
    Code:
    set DJGPP=C:\DJGPP\DJGPP.ENV
    and probably
    Code:
    set PATH=%PATH%;C:\DJGPP\BIN
    or whereever you installed it.
    Yes I have those lines but it appears somewhere that
    DJGPP has been hard coded as DGJPP in the version I
    got (default version).
    I tried using the mistyped names but that didn't work either.

    Both my versions (obviously different) had the same version number 2.03 (IIRC) in the readme.1st file.

    Anyway the 'old' version works fine for me so I have no
    problems compiling and running programs with it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C Compiler and stuff
    By pal1ndr0me in forum C Programming
    Replies: 10
    Last Post: 07-21-2006, 11:07 AM
  2. I can't get this new compiler to work.
    By Loduwijk in forum C++ Programming
    Replies: 7
    Last Post: 03-29-2006, 06:42 AM
  3. how to call a compiler?
    By castlelight in forum C Programming
    Replies: 3
    Last Post: 11-22-2005, 11:28 AM
  4. Problems about gcc installation
    By kevin_cat in forum Linux Programming
    Replies: 4
    Last Post: 08-09-2005, 09:05 AM
  5. GNU Public Domain Compiler
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 08-22-2002, 06:55 AM