Using NuttX Libraries/API from Custom Module

I’m developing a module for PX4. I have everything working on Linux/Posix, but I can’t get it to link on NuttX. It doesn’t find the symbols from the NuttX libraries that I’m using. I see the correct .a file from NuttX submitted on the compiler line, and I see the symbols in that .a file with nm. I know that the linker is sensitive to ordering, but I don’t know how to change the order of the object files and libraries submitted to the linker.

Are there any guidelines on how to use the NuttX API from a custom module?

To answer my own question, it was my own dumb mistake. I was missing a critical “extern C” wrapper. Anyone seeing the same problem: NuttX is mostly plain C, so you probably need the extern “C” as well.