Why do my programs keep coming up as NTVDM CPU illegal instruction?

  • Thread starter nst.john
  • Start date
I am using Windows XP Version 2002 and I am using freecommandLinetools as a compiler for the c++ language. Every time I write a program it always says it is an NTVDM CPU illegal instruction and it doesn't work, what's wrong with my programs? Here is an example:
#include <iostream>

using namespace std;

int main()
  cout<<"HEY, you, I'm alive! Oh, and Hello World!\n";

  return 1;
Is something wrong with my program? Or do I need a new compiler for my computer, or what ever? What's the problem? Thanks in advance!
Last edited by a moderator:

jim mcnamara

XP systems stopped being supported in the summer of 2010. Getting a new compiler will be difficult, but it does appear to me to be a compiler problem - it requests a hardware opcode your system does not support. As a last ditch effort try this as a fix - it is a guess on my part.:


Want to reply to this thread?

"Why do my programs keep coming up as NTVDM CPU illegal instruction?" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving