Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
1 of 3
nonsensickle
  • 4.6k
  • 2
  • 37
  • 64

You need to wrap the C code like so

extern "C" { #include "sample1.h" } 

See Including C Code in C++ for an example and Combining C++ and C - how does #ifdef __cplusplus work? for details

nonsensickle
  • 4.6k
  • 2
  • 37
  • 64