Share via


C1083: Cannot open include file: 'crtdefs.h'

Question

Thursday, June 15, 2006 9:58 PM

 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
   
Creating temporary file "f:\Program Files\Microsoft SDK\Bin\HELLO!\TIM\TIM\Debug\RSP0000392883768.rsp" with contents
[
/Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MDd /Yu"stdafx.h" /Fp"Debug\TIM.pch" /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /c /Wp64 /ZI /TP ".\TIM.cpp"
]
Creating command line "cl.exe @"f:\Program Files\Microsoft SDK\Bin\HELLO!\TIM\TIM\Debug\RSP0000392883768.rsp" /nologo /errorReport:prompt"
Creating temporary file "f:\Program Files\Microsoft SDK\Bin\HELLO!\TIM\TIM\Debug\RSP00003A2883768.rsp" with contents
[
/Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MDd /Yc"stdafx.h" /Fp"Debug\TIM.pch" /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /c /Wp64 /ZI /TP ".\stdafx.cpp"
]
Creating command line "cl.exe @"f:\Program Files\Microsoft SDK\Bin\HELLO!\TIM\TIM\Debug\RSP00003A2883768.rsp" /nologo /errorReport:prompt"
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?

 

All replies (3)

Thursday, June 15, 2006 10:05 PM ✅Answered

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


Thursday, June 15, 2006 10:07 PM ✅Answered

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.


Monday, June 26, 2006 3:56 AM

  Hi Jonathan Caves :

  It works for me.

  Thank you.