Link Error : L1822

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Link Error : L1822

跳至解决方案
735 次查看
spider_man
Contributor I

Hi,

 

There is user made assembly function in my program, which I was using in different ".c" files and it was working fine .

But when I used it in a ".cpp" file I got a link error L1822 : Symbol functionname__FUc in file is undefined.

 

I tried everything to resolve it.

Included ansixbf.lib file.

Included the extern prototype of the function but its not working .

 

So if anybody knows about this link error plz help.

Thanks.

标签 (1)
0 项奖励
回复
1 解答
557 次查看
CrasyCat
Specialist III

Hello

 

Did you specify in the prototype of the assembly that it should use the C name mangling?

 

In order to do that the prototype should be enclosed between

 

#ifdef __cplusplus
extern "C" {
#endif

and


#ifdef __cplusplus
 }
#endif

 

CrasyCat

在原帖中查看解决方案

0 项奖励
回复
2 回复数
558 次查看
CrasyCat
Specialist III

Hello

 

Did you specify in the prototype of the assembly that it should use the C name mangling?

 

In order to do that the prototype should be enclosed between

 

#ifdef __cplusplus
extern "C" {
#endif

and


#ifdef __cplusplus
 }
#endif

 

CrasyCat

0 项奖励
回复
557 次查看
spider_man
Contributor I

Hi

It worked fine .

Thanks a lot.

Spidy :-P

0 项奖励
回复