用向导生成的Dll中加入自己的类出错!
但是我按照VC的ATL向导生成了一个Dll
然后我建了一个类
文件名:test.h
class test{
public:
test(){
a = 1;
}
int getIntValue();
void setIntValue(int newInt);
~test(){};
private:
int a;
};
它的实现文件:test.cpp
#include "test.h"
#include "stdafx.h" ----------------------------------------请注意
int test::getIntValue(){
return a ;
}
void test::setIntValue(int newInt){
a = newInt;
}
把这两个文件分别加入相应的文件夹中,但是
在test.cpp中,我把#include "stdafx.h"注释掉后:
VC报错内容为:
fatal error C1010: unexpected end of file while looking for precompiled header directive
Error executing cl.exe.
如果不注释掉,VC报错的内容为:
error C2653: 'test' : is not a class or namespace name
error C2065: 'a' : undeclared identifier
error C2653: 'test' : is not a class or namespace name
请大虾们指点分析一下,
然后我建了一个类
文件名:test.h
class test{
public:
test(){
a = 1;
}
int getIntValue();
void setIntValue(int newInt);
~test(){};
private:
int a;
};
它的实现文件:test.cpp
#include "test.h"
#include "stdafx.h" ----------------------------------------请注意
int test::getIntValue(){
return a ;
}
void test::setIntValue(int newInt){
a = newInt;
}
把这两个文件分别加入相应的文件夹中,但是
在test.cpp中,我把#include "stdafx.h"注释掉后:
VC报错内容为:
fatal error C1010: unexpected end of file while looking for precompiled header directive
Error executing cl.exe.
如果不注释掉,VC报错的内容为:
error C2653: 'test' : is not a class or namespace name
error C2065: 'a' : undeclared identifier
error C2653: 'test' : is not a class or namespace name
请大虾们指点分析一下,
...全文
相关推荐
补丁针对生成的易语言调用DLL出错
补丁针对生成的易语言调用DLL出错的程序: ---------- 错误 ----------- “运行时出错!错误代码:6错误信息:调用DLL命令后发现堆栈错误”. ---------------------------------------------------------------- (使用前,把要补丁的程序重命名为123.exe)
打不开qt生成的exe常用的.dll
Qt5.6.2生成的exe文件,单独打开的时候常常出错,缺少Qt5Widgetsd,Qt5Widgets,Qt5Guid,Qt5Cored,Qt5Core等dll,下载此文件后放在exe文件夹即可打开。
DLL2PAS Delphi据DLL自动生成PAS文件..rar
DLL2PAS Delphi据DLL自动生成PAS文件..rar
解决classification_dll.dll无法找的问题
将下载的dll压缩包中的dll全部放到C盘的windows目录下就可以了 压缩包包含五个dll,只要全部放到windows目录下就好了 为解决以下异常: 运行时出错! 错误信息:无法找到指定DLL库文件“classification_dll.dll”中的输出命令“createTaskPoolByData”
VS生成CMDexe出错解决方案
VS生成CMDexe出错解决方案


