在VC下调用一dll问题,高分求助 近日,我用Delphi写了一些函数,都封装在一dll中。我现想在VC下使用这些函数,但没有lib文件,程序老是链接错误。各位仁兄帮帮忙!!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用 Dynamic-Link Libraries LoadLibrary GetProcAddress FreeLibrary... 详见MSDN帮助 VC下的头文件为:#ifndef _SHEN_H#define _SHEN_Hextern "C"{void APIENTRY OpenIniFile(char* FileName);void APIENTRY CloseIniFile();int APIENTRY ReadInteger(char* Section,char* Ident,int Default);double APIENTRY ReadFloat(char* Section,char* Ident,double Default);char* APIENTRY ReadString(char* Section,char* Ident,char* Default);void APIENTRY WriteInteger(char* Section,char* Ident,int Value);void APIENTRY WriteFloat(char* Section,char* Ident,double Value);void APIENTRY WriteString(char* Section,char* Ident,char* Value);}#endif 不知为什么,出现下列错误:qwView.obj : error LNK2001: unresolved external symbol _OpenIniFile@4Debug/qw.exe : fatal error LNK1120: 1 unresolved externalsError executing link.exe. 改写一下:extern "C" __declspec( dllexport ){...} 我试过,还是出现刚才的错误。我想是没有.lib文件,但我不知道用什么tools由dll文件生成lib文件。 把#program comment(lib,"xxxx.lib")放在前面试试 :) o_racle(璐璐) 同意 webbrowser的BEFORENAVIGATE2事件 无线网络数据传输是否一定要有IP地址? 求助 怎样在状态栏里添加图标!? CString怎么和其他类型转换? 数据转换 我想在程序中关闭某个文档,不知道应该怎么实现? 软件的logo问题 谁能告诉我什么是ERP,通俗易懂但明确一点 怎么实现像NETXRAY那样的截获HTTP报文?还有...... 如何在窗口中画一矩形,用键盘上的up\down\right\left控制矩形的运动,(使用WIN32编程) 请问鼠标离开窗口时,是发送什么消息的?
GetProcAddress
FreeLibrary... 详见MSDN帮助
#ifndef _SHEN_H#define _SHEN_Hextern "C"{void APIENTRY OpenIniFile(char* FileName);
void APIENTRY CloseIniFile();
int APIENTRY ReadInteger(char* Section,char* Ident,int Default);
double APIENTRY ReadFloat(char* Section,char* Ident,double Default);
char* APIENTRY ReadString(char* Section,char* Ident,char* Default);
void APIENTRY WriteInteger(char* Section,char* Ident,int Value);
void APIENTRY WriteFloat(char* Section,char* Ident,double Value);
void APIENTRY WriteString(char* Section,char* Ident,char* Value);
}#endif
不知为什么,出现下列错误:
qwView.obj : error LNK2001: unresolved external symbol _OpenIniFile@4
Debug/qw.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
extern "C" __declspec( dllexport )
{
...
}
同意