Thread: fatal error C1001: INTERNAL COMPILER ERROR

  1. #1
    Unregistered
    Guest

    fatal error C1001: INTERNAL COMPILER ERROR

    I have this error now when I compile 1 of my .cpp files. It seems to be because of the namespace line, what must I change to get it to compile correctly?

    Code:
    #ifndef VECTOR3D_H
    #define VECTOR3D_H
    
    #include <fstream>
    #include <GL/glut.h>
    
    using namespace std;
    
    class Vector3d
    {
    public:
    	//data members
    	GLfloat triple[ 3 ];
    
    	//constructors
    	Vector3d( );
    	Vector3d( GLfloat, GLfloat, GLfloat );
    	Vector3d( Vector3d& );
    	~Vector3d( );
    
    	//functions
    	GLvoid printVector( ) const;
    	GLfloat length( ) const;
    	GLvoid normalise( );
    	friend GLfloat dotProduct( const Vector3d& a, const Vector3d& b );
    	friend Vector3d crossProduct( const Vector3d& a, const Vector3d& b );
    	GLvoid setValues( GLfloat x, GLfloat y, GLfloat z );
    
    	//operators
    	friend Vector3d operator + ( const Vector3d& a, const Vector3d& b );
    	friend Vector3d operator - ( const Vector3d& a, const Vector3d& b );
    	friend Vector3d operator * ( const Vector3d& a, const Vector3d& b );
    	friend Vector3d operator / ( const Vector3d& a, const Vector3d& b );
    	friend Vector3d operator * ( const Vector3d& a, const GLfloat scalar );
    	friend Vector3d operator / ( const Vector3d& b, const GLfloat scalar );
    	friend bool operator == ( const Vector3d& a, const Vector3d& b );
    	friend bool operator != ( const Vector3d& a, const Vector3d& b );
    	Vector3d& operator = ( const Vector3d& rvalue );
    	friend ofstream& operator << ( ofstream& os, const Vector3d& a );
    };
    
    #endif
    The corresponding .cpp file only includes this .h file and <cmath>

  2. #2
    LiamBattle
    Guest
    If no error messages have been emitted prior to the internal compiler error, then the next step is to determine which pass of the compiler is emitting the internal compiler error. This can be determined by recompiling the application with the /Bd option included. The /Bd option will cause each pass to print its name and arguments when it is invoked. The last pass invoked before the error is emitted is the one responsible.

    If the pass indicated is P1, then the likely problem is still error recovery, as in number one above, but it is happening before the compiler has had a chance to emit the error message for the error it has just discovered. In such a case, examine the line on which the internal compiler error is reported. This line may also contain an unreported syntax error. Fixing any errors you find on that line will solve the internal compiler error in most cases. If you cannot find any error on that line or on the line previous to the one reported, contact Microsoft Product Support Services for help.

    If the pass indicated is P2, then the problem can usually be fixed by removing one or more optimization options (or using a different code generator). You can determine which option is at fault by removing them one at a time and recompiling until the message goes away. Generally the last one removed is the problem and all other optimizations can be used safely. The most common culprits are /Og, /Oi, and /Oa. Once the offending optimization is discovered, it need not be turned off for the entire compilation. The offending optimization can be disabled with the optimize pragma while compiling the function where the error occurred, but enabled for the rest of the module.

  3. #3
    Unregistered
    Guest
    Nice pasting

    Any idea how to switch the /Bd option on?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. failure to import external C libraries in C++ project
    By nocturna_gr in forum C++ Programming
    Replies: 3
    Last Post: 12-02-2007, 03:49 PM
  2. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 10:43 AM
  3. Problem with Visual C++ Object-Oriented Programming Book.
    By GameGenie in forum C++ Programming
    Replies: 9
    Last Post: 08-29-2005, 11:21 PM
  4. pointer to array of objects of struct
    By undisputed007 in forum C++ Programming
    Replies: 12
    Last Post: 03-02-2004, 04:49 AM
  5. UNICODE and GET_STATE
    By Registered in forum C++ Programming
    Replies: 1
    Last Post: 07-15-2002, 03:23 PM