我有一个动态链接库是CVI8.5写的,用CVI8.5调用没有问题,但用VC2005调用的时候链接总是错误。
我的dll和调用程序共享一个.h:
#include ".\CVIsystemDll\cvidef.h"
/* Here are the function prototypes suitable for including in a
program which uses the dll. */extern long int DLLIMPORT __stdcall MyDLLStdcallFunction(char * dummycharname);
extern long int DLLIMPORT MyDLLCdeclFunction(char * dummycharname);
extern void DLLIMPORT RunDllUI (void);请见附件,我将Labwindows/CVI 的动态链接库源码和VC2005调用方的源码都上传上来。
我的dll和调用程序共享一个.h:
#include ".\CVIsystemDll\cvidef.h"
/* Here are the function prototypes suitable for including in a
program which uses the dll. */extern long int DLLIMPORT __stdcall MyDLLStdcallFunction(char * dummycharname);
extern long int DLLIMPORT MyDLLCdeclFunction(char * dummycharname);
extern void DLLIMPORT RunDllUI (void);请见附件,我将Labwindows/CVI 的动态链接库源码和VC2005调用方的源码都上传上来。
我的邮件:[email protected]
有大侠发我一下,我传给你们看看。
extern "C" long int DLLIMPORT MyDLLCdeclFunction(char * dummycharname);
extern "C" void DLLIMPORT RunDllUI (void);
试试
#ifdefine cplusplus
extern "c"
#endif结贴了,都有分。