BCB编写DLL的问题
yesry 2003-10-24 09:08:17 项目:ShareMemory
//+-+-+-+-+-+-+ uShareMemory.cpp -+-+-+-+-+-+-+-+-+-
extern char buff[100];
extern "C"
__declspec(dllexport) void WINAPI
Mem(char *p)
{
if(p[0])
{
strcpy(buff,p);
}else
{
strcpy(p,buff);
}
}
//+-+-+-+-+-+-+ ShareUnit.cpp -+-+-+-+-+-+-+-+-+-
#pragma option -zRShareSEG // 改变缺省数据段名
#pragma option -zTShareCLASS // 改变缺省数据类名
char buff[100];
int LoadCount=0; // DLL装入次数计数
int ShareVar=9;
#include "ShareUnit.h"
//+-+-+-+-+-+-+ ShareUnit.def -+-+-+-+-+-+-+-+-+-
SEGMENTS ShareSEG CLASS 'ShareCLASS' SHARED
出现错误了
[Linker error] Section ShareSEG define in .def file is empty
我不知道如何解决[精华去还说解决了,但我不知道缺少什么]
还望各位大侠赐教!不胜感激!