Link Error : L1822

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Link Error : L1822

Jump to solution
620 Views
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.

Labels (1)
0 Kudos
1 Solution
442 Views
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

View solution in original post

0 Kudos
2 Replies
443 Views
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 Kudos
442 Views
spider_man
Contributor I

Hi

It worked fine .

Thanks a lot.

Spidy :-P

0 Kudos