G
Guest
Hi all,
I used 'Empty Project'/native C++ of the VC++ .NET 2002 to do 'Build' for the SimpleRegular.cpp and SourceFile.h files of the attached code of creation of a simple regular DLL and I got an Error C1083 - can not find or open <stdafx.h>. Is <stdafx.h> already built in the VC++ .NET system? What is wrong in this coding to do 'Build'? Can someone help and point out what is wrong with this coding and how to correct it?
Thanks in advance,
Scott Chang
----------------------------------------------
//////---SimpleRegularDLL.cpp---///////////
# include <stdafx.h>
# include "SourceFile.h"
class CDllApp : public CWinApp
{
public:
CDllApp::CDllApp()
{
Calc(0,0);
}
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(CDllApp,CWinApp)
END_MESSAGE_MAP()
CDllApp DllObject;
///////---SourceFile.h------/////////
extern "C" _declspec(dllexport) int Calc(char no1,char no2)
{
char result;
result = no1 + no2;
return result;
}
I used 'Empty Project'/native C++ of the VC++ .NET 2002 to do 'Build' for the SimpleRegular.cpp and SourceFile.h files of the attached code of creation of a simple regular DLL and I got an Error C1083 - can not find or open <stdafx.h>. Is <stdafx.h> already built in the VC++ .NET system? What is wrong in this coding to do 'Build'? Can someone help and point out what is wrong with this coding and how to correct it?
Thanks in advance,
Scott Chang
----------------------------------------------
//////---SimpleRegularDLL.cpp---///////////
# include <stdafx.h>
# include "SourceFile.h"
class CDllApp : public CWinApp
{
public:
CDllApp::CDllApp()
{
Calc(0,0);
}
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(CDllApp,CWinApp)
END_MESSAGE_MAP()
CDllApp DllObject;
///////---SourceFile.h------/////////
extern "C" _declspec(dllexport) int Calc(char no1,char no2)
{
char result;
result = no1 + no2;
return result;
}