-
May 9th, 2005, 07:19 PM
#1
Can't Cannot open precompiled header file: 'Debug\test4.pch': No such file or directo
I use the Visual C++ 2005 Express beta2.
and here is a simple program i have writed:
Code:
#include "stdafx.h"
#include <iostream>
uing namespace std;
using namespace System;
int main(array<System::String ^> ^args)
{
cout<<"success!";
Console::WriteLine(L"Hello World");
return 0;
}
//-----------------------------------------------------------------
but it alaways tell me the error information
fatal error C1083: Cannot open precompiled header file: 'Debug\test4.pch': No such file or directory
that's why?who know that.
-
May 10th, 2005, 07:38 AM
#2
Re: Can't Cannot open precompiled header file: 'Debug\test4.pch': No such file or dir
Succinct is verbose for terse
-
May 11th, 2005, 06:46 PM
#3
Re: Can't Cannot open precompiled header file: 'Debug\test4.pch': No such file or directo
right click on the file name in the explorer (under source files)
select properties
select precompiled headers
select "not using precompiled headers"
-
May 11th, 2005, 07:41 PM
#4
Re: Can't Cannot open precompiled header file: 'Debug\test4.pch': No such file or dir
Go to your project folder and delete your debug folder. This erases your old Precompiled Header file. If you made changes to any precompiled headers and then compiled them, it will give this error if you are "Using Precompiled Headers".
--MrDoomMaster
--C++ Game Programmer
Don't forget to rate me if I was helpful!
-
May 12th, 2005, 04:44 AM
#5
Re: Can't Cannot open precompiled header file: 'Debug\test4.pch': No such file or directo
I always disable precompiled headers when using Visual C++. I want portable code, and it compiles fast enough for me anyway.
-
May 15th, 2009, 08:16 PM
#6
Re: Can't Cannot open precompiled header file: 'Debug\test4.pch': No such file or dir
Try to Change #include <iostream> to #include "iostream.h"
-
May 15th, 2009, 08:43 PM
#7
Re: Can't Cannot open precompiled header file: 'Debug\test4.pch': No such file or dir
Originally Posted by erikax
Try to Change #include <iostream> to #include "iostream.h"
No. iostream.h is an out of date header; iostream (no .h) is correct.
-
May 15th, 2009, 09:41 PM
#8
Re: Can't Cannot open precompiled header file: 'Debug\test4.pch': No such file or dir
Originally Posted by erikax
Try to Change #include <iostream> to #include "iostream.h"
How is that going to solve the problem?
Anyway, there is no such header file as "iostream.h" in Visual C++ 2003 and above.
Regards,
Paul McKenzie
-
May 15th, 2009, 09:43 PM
#9
Re: Can't Cannot open precompiled header file: 'Debug\test4.pch': No such file or dir
Originally Posted by mloonjin
I use the Visual C++ 2005 Express beta2.
and here is a simple program i have writed:
Code:
int main(array<System::String ^> ^args)
Wrong forum. That is not C++. That is some other language called "Managed C++", which is not the same as C++.
Regards,
Paul McKenzie
-
May 21st, 2011, 02:12 AM
#10
Re: Can't Cannot open precompiled header file: 'Debug\test4.pch': No such file or dir
Make sure that stdafx.cpp is set to /Yc. Right-click, properties, C/C++, Precompiled Headers, Precompiled Header = Create (/Yc)
-
May 21st, 2011, 06:29 AM
#11
Re: Can't Cannot open precompiled header file: 'Debug\test4.pch': No such file or dir
Originally Posted by exsuscito
Make sure that stdafx.cpp is set to /Yc. Right-click, properties, C/C++, Precompiled Headers, Precompiled Header = Create (/Yc)
Can somebody please explain to me why people bump really old threads for their first post. This one is six years old. I really don't get it.
-
May 21st, 2011, 09:23 AM
#12
Re: Can't Cannot open precompiled header file: 'Debug\test4.pch': No such file or dir
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|