Unresolved outer mystery

My linker reports the error like this:

unresolved external symbol "unsigned char __fastcall BD_CLC(int,int)"...

      

But I claim that all references to this function as well as the definition of the function are of the form:

__forceinline UBYTE BD_CLC(int swap,int elem);

      

I even did a compilation with the "Generate preprocessed file" set and went through the exit. In every file where BD_CLC was used, the function was declared as

__forceinline UBYTE BD_CLC(int swap,int elem);

      

and of course the actual function definition was declared as

__forceinline UBYTE BD_CLC(int swap,int elem) { ... }

      

Any ideas?

+2


source to share


3 answers


Since you declared the __forceinline function, you need to make sure that the definition - not just a declaration - is visible wherever the function is called.



+2


source


I think you might have to disable the "Calling Convention" / GR compiler option. Perhaps __fastcall is causing the Linker error.



/ Gr specifies calling __fastcall convention for all functions except Functions and C ++ member functions marked with __cdecl or __stdcall. All __fastcall Functions must be prototyped.

+1


source


I would try to remove the __forceinline attribute.

0


source







All Articles