C1083: Cannot open include file: 'crtdefs.h'  
Author Message
Alan Foster





PostPosted: Visual C++ General, C1083: Cannot open include file: 'crtdefs.h' Top

Hi ALL:

The Story so far ...

We are trying to get C++ Express to go!

So Far it is not doing anything except

giving cryptic error messages.

Build Log

Build started: Project: TIM, Configuration: Debug|Win32

Command Lines

Output Window

Compiling...
stdafx.cpp
f:\program files\microsoft sdk\bin\hello!\tim\tim\stdio.h(22) : fatal error C1083: Cannot open include file: 'crtdefs.h': No such file or directory

Results

Build log was saved at "file://f:\Program Files\Microsoft SDK\Bin\HELLO!\TIM\TIM\Debug\BuildLog.htm"
TIM - 1 error(s), 0 warning(s)

Still not going any way fast!

#include <stdio.h>

using namespace std;

int main(int)

{

cout << "\nHello World!\n" << endl;

return 0;

}

// TIM.cpp : Defines the entry point for the console application.

//

#include "stdafx.h"

int _tmain(int argc, _TCHAR* argv[])

{

return 0;

}

Any Suggestions



Visual C++6  
 
 
Ayman Shoukry - MSFT





PostPosted: Visual C++ General, C1083: Cannot open include file: 'crtdefs.h' Top

why do you have 2 main methods there All what you need is:

#include <iostream>

using namespace std;

int main()

{

cout << "\nHello World!\n" << endl;

return 0;

}

Try the above sample and see how it goes.

Thanks,
Ayman Shoukry
VC++ Team


 
 
Jonathan Caves - MSFT





PostPosted: Visual C++ General, C1083: Cannot open include file: 'crtdefs.h' Top

The file crtdefs.h should be in the same directory as the file stdio.h - you should check it is there and if it isn't you might want to try re-installing Visual C++ Express.

 
 
Alan Foster





PostPosted: Visual C++ General, C1083: Cannot open include file: 'crtdefs.h' Top

Hi Jonathan Caves :

It works for me.

Thank you.