Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

Linker question

Hello,

I have an assembly function (say A).

In my C code, I declare the function with extern "C" { void A(int val); };

In a class, there is a function delcared B, that is calling A inline :

class test
{
//other stuff
void B(int val) 
  {
    A(val); 
  };
    
};

The combination of the class header file, the class implementation file and the assembler file is putted in a library after compilation.

The main project uses the library, but the linker can not find the assembler routine. If I change the B() function to a non-inline one, it works.

Do I need to add somewhere a specific option to tell the compiler/linker how to find it??

Help appreciated.

Stefaan.

1 Reply