This program requares microsoft windows

This is a discussion on This program requares microsoft windows within the Windows Programming forums, part of the Platform Specific Boards category; Hello, at university i got task to make program for old 16bit compiler C600min(C optimizing compiler version 6.0). For example: ...

  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    2

    Red face This program requares microsoft windows

    Hello,
    at university i got task to make program for old 16bit compiler C600min(C optimizing compiler version 6.0). For example:
    Code:
                         //a.c
                         int main(void){
                                  int a = 10;
                                   return 0;
                         }
    cl.exe a.c //compile and generate exe file.
    Seems everything good but then i tray to execute exe file i got message "This program requares microsoft windows".
    I'm using XP. May it's not possible? May i need win 3?

    Thanks for any ideas.
    Last edited by CornedBee; 10-29-2007 at 01:30 PM. Reason: Put the code tags in the right place.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I'm pretty sure you can work around the problem, but why are you using an ancient compiler?

    The latest Visual Studio C++ 2005 Express is available from MS for free (Search for Visual Studio C++ download or some such on the MS Website). Although you may need to use a different compiler at your school, using the latest compiler at home should be OK.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    So you're compiling a program in an ancient compiler and wondering why the program doesn't work on a modern OS?

    Edit: I can't believe I got beaten by a millisecond.

  4. #4
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Apparently you are using some setting that makes the executable a windows program, and the compilers code improperly checks for specific version numbers istead of the proper format of just makign sure the version is equal to or greater than a certain value. This is a common problem in older software, the only workaround is to hex edit the executable and change the version ID that it is looking for , or to disassemble the code and skip the windows check. Then again if you can find the setting in your compiler that is making this a windows executable you can make it a DOS executable, which is what you wrote it as.

    Wish I hadnt lost that copy of Turbo C/C++ I had years ago.

    Better yet, just go to Free Turbo C++ for Windows
    Last edited by abachler; 10-29-2007 at 10:44 AM.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  5. #5
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Turbo C is OK if you REALLY want to create a DOS executable, but if you are actually wanting to make a Windows (32-bit) executable, then it's not such a good choice.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  6. #6
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    That link isnt for the old 16 bit version, its for the new (2005) release of Turbo C for windows XP.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  7. #7
    Registered User
    Join Date
    Oct 2007
    Posts
    2
    Reason why i use ancient compiler is teacher, old strange teacher.

  8. #8
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,312
    Why not ask the teacher for help?
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  9. #9
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    I like that answer best of all. Some teachers present problems that they know the students will probably not be able to solve without help. Its a test to see if the students know what they know and are willing to ask for help when they have a question.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem building Quake source
    By Silvercord in forum Game Programming
    Replies: 16
    Last Post: 07-11-2010, 10:13 AM
  2. Anyone view this forum on a Blackberry?
    By Sharke in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 06-09-2009, 05:02 PM
  3. Replies: 2
    Last Post: 12-22-2006, 08:45 PM
  4. Script errors - bool unrecognized and struct issues
    By ulillillia in forum Windows Programming
    Replies: 10
    Last Post: 12-18-2006, 04:44 AM
  5. Replies: 1
    Last Post: 12-17-2002, 01:06 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21