50分不晓得够不?不够就说,我加给你

nuke505 2005-05-10 08:24:21
我使用Visual C++ 2005 Express beta2.写了一个简单的程序:

#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;
}

但总是出现一个错误:fatal error C1083: Cannot open precompiled header file: 'Debug\test4.pch': No such file or directory
哪个见过的帮我改改.
...全文
141 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
nuke505 2005-05-10
  • 打赏
  • 举报
回复
搞定了,重新编译一下stdapx.cpp就行了
oyljerry 2005-05-10
  • 打赏
  • 举报
回复
rebuild all试试
bing_huo 2005-05-10
  • 打赏
  • 举报
回复
好象编译选项要改。。。具体不是很清楚。。查查msdn关于托管代码的部分
diaoni 2005-05-10
  • 打赏
  • 举报
回复
是写托管C++吧,为什么没有#using <mscorlib.dll>?
homeforrose 2005-05-10
  • 打赏
  • 举报
回复
第一次编译不可能会有这种ERROR呀
这个时候DEBUG根本就不存在的。
不过删除Debug后到是经常遇到这种问题的。
nuke505 2005-05-10
  • 打赏
  • 举报
回复
更奇怪的是,我编的下面这个程序却能很好的编译通过,运行成功,不过下面的程序是在上面那个之前编的。不晓得是哪出了问题
// test3.cpp : main project file.

#include "stdafx.h"
#include <iostream>
using namespace std;
using namespace System;

int main(array<System::String ^> ^args)
{
Console::WriteLine(L"Hello World");
Console::WriteLine(L"good good very good");
cout<<"well";
return 0;
}
nuke505 2005-05-10
  • 打赏
  • 举报
回复
没有,我没删debug
homeforrose 2005-05-10
  • 打赏
  • 举报
回复
你是不是编译后把debug删除了后在编译时出现的后一个ERROR?
nuke505 2005-05-10
  • 打赏
  • 举报
回复
什么是 MBCS characters
什么是 system locale
nuke505 2005-05-10
  • 打赏
  • 举报
回复
还有,那我到底怎么改啊
nuke505 2005-05-10
  • 打赏
  • 举报
回复
你是怎样用MSDN的,是用哪个关键词搜索的还是其他办法?
我一直没搞懂怎样好好的用MSDN
dzw2004 2005-05-10
  • 打赏
  • 举报
回复
缺少预编译头文件,'Debug\test4.pch'这个文件不存在,以下是msdn给的
Possible causes
File does not exist.
File, subdirectory, or disk is read-only.
No access permission for file or directory.
Not enough file handles. Close some applications and recompile.
The INCLUDE environment variable is set incorrectly.
An #include directive uses double quotation marks around a path specification, which causes the standard directories to be skipped.
You did not specify /clr and your program uses managed constructs.
In Visual C++ .NET (version 1300 of the compiler), there is a bug that requires the user locale to be set correctly when the file name (or directory path to the file name) contains MBCS characters. Setting the system locale is not sufficient; the user locale must be set to process MBCS characters.
The following sample generates C1083:
// C1083.cpp
#include "test.h" // C1083, test.h does not exist

int main() {
}

64,643

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧