Hacker News new | ask | show | jobs
by uecker 31 days ago
You can just run it through a compiler in c++ language mode.
1 comments

Compiler mode won't catch the `extern "C"` thing though. Both sides compile happily, link blows up on mangled names. What I do is just keep a throwaway .cpp in tests that #includes the header and calls a few of the public functions. Dumb but it's basically the only thing that ever catches that case before some downstream user does.