Hi,
I have a C++ application in which I'd like to use the Freescale USB stack, specifically the MSD class.
From previous experience, I've had to decorate my C prototypes with extern "C" in order for them to work in C++, due to the way the linker works.
Will I have to do exactly the same with all routines that make up the USB stack?
Thanks,
Kev
Solved! Go to Solution.
Hello,
with 'extern "C"' you need to mark interfaces you are calling from C++. So whatever you have compiled in C mode, and gets called by C++ code, needs to be marked with that extern "C".
As for the MSD stack, this would only apply to a few routines, I guess. It just depends how you structure your application and the interface to the stack.
Hope this helps,
Erich
Hello,
with 'extern "C"' you need to mark interfaces you are calling from C++. So whatever you have compiled in C mode, and gets called by C++ code, needs to be marked with that extern "C".
As for the MSD stack, this would only apply to a few routines, I guess. It just depends how you structure your application and the interface to the stack.
Hope this helps,
Erich
Thanks for your reply.
I've done as you've mentioned and this works perfectly.
Thanks,
Kev