Skip to content

Instantly share code, notes, and snippets.

@bobbyg603
Created July 31, 2022 10:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bobbyg603/11d72b67d68a235d18ef87dbdeb7764d to your computer and use it in GitHub Desktop.
Save bobbyg603/11d72b67d68a235d18ef87dbdeb7764d to your computer and use it in GitHub Desktop.
How to Build a Linux Shared Library
// Define a preprocessor macro so that mars.h is only included once
#ifndef mars_h__
#define mars_h__
// Export the mars function in your shared library so it can be used by other projects
extern void mars(void);
#endif // mars_h__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment