开发者

Problem Calling method inside a dll from another dll in VC++

I am trying to Build a win DLL in Vc++ smart project for mobile application 5.0 using c#

In my DLL a method called from another DLL.

I make the following settings in the dll project :

Tools ->options -> vc++ Directories

platform->windows mobile 5.0 sdk set the corresponding include and lib path.

Set the lib file as follows : project properties -> linker -> input开发者_如何学JAVA -> additional dependencies

provide the additional include directories in the project properties -> C/C++ -> General

In the dll project i export the function declaration in the .h file in the following way :

__declspec (dllexport) int __cdecl CloseBTStack(void);

this type of error comes at build time for that called method..

Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) int __cdecl GAP_Query_Local_BD_ADDR(unsigned int,struct _tagBD_ADDR_t *)" (_imp?GAP_Query_Local_BD_ADDR@@YAHIPAU_tagBD_ADDR_t@@@Z) referenced in function "int __cdecl OpenBTStack(void)" (?OpenBTStack@@YAHXZ) SDPDll.obj SDPDll

plz help me...


In the .h file, write

extern "C" {

include "createdll.dll"

}

Then it execute fine.........

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜