一个让人丈二和尚摸不着头脑的编译错误
请问下为什么我编译原文件是总是如下错误:
d:\BillardsServer\BillardsServer\Export.cpp(21): fatal error C1010: 在查找预编译头指令时遇到意外的文件结尾
就是当我把。CPP文件删空也解决不了,痛苦啊,这个问题从我刚学VC时就阴魂不散缠上我了,6.0和7.0都一样。
有那位大哥能帮我解决了,磕个头先
虽然搜索帮助是这样:
unexpected end of file while looking for precompiled header directive
A precompiled header did not contain a precompiled header directive.
Possible causes
Incorrect file specified as a header file.
An include file specified with /Yu (Use Precompiled Header) is not listed in the source file.
但这里准确的意思是什么啊
另外:我想在.NET里创建一个空的DLL项目,比如就一个入口函数,
如:
#include <windows.h>
//#include <afxwin.h>
BOOL WINAPI DllMain(HINSTANCE hDllHinstm,DWORD dwReason,LPVOID lpReserved)
{
return TRUE;
}
怎么用<windows.h>可以,而用〈afxwin.h>就有如下连接错误:
正在链接...
nafxcw.lib(dllmodul.obj) : error LNK2005: _DllMain@12 已经在 exp.obj 中定义
Release/exp.dll : fatal error LNK1169: 找到一个或多个多重定义的符号
虽然我知道这必须在设置里弄,但试了N次没成功(只有偶然的一个方法成功了),应该怎么办?