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

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



Answer this question

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

  • adelino

    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.

  • Azath

    Hi Jonathan Caves :

    It works for me.

    Thank you.


  • Kim

    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


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