Reputation: 7947
My linker is reporting an error as follows:
unresolved external symbol "unsigned char __fastcall BD_CLC(int,int)"...
But I maintain 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 "Generate preprocessed file" set and went through the output. 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?
Upvotes: 2
Views: 1291
Reputation: 89115
Since you've declared the function __forceinline, you need to make sure the definition - not just the declaration - is visible everywhere the function is called.
Upvotes: 4
Reputation: 1375
I think you may have to turn off the /GR "Calling Convention" compiler option. Perhaps the __fastcall is causing the Linker error.
/Gr specifies the __fastcall calling convention for all functions except C++ member sfunctions and functions marked __cdecl or __stdcall. All __fastcall functions must have prototypes.
Upvotes: 1