Link Error : L1822

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
739件の閲覧回数
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 解決策
561件の閲覧回数
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 返答(返信)
562件の閲覧回数
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 件の賞賛
返信
561件の閲覧回数
spider_man
Contributor I

Hi

It worked fine .

Thanks a lot.

Spidy :-P

0 件の賞賛
返信