How to make a c shared library

This page summarizes the projects mentioned and recommended in the original post on /r/AskProgramming

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • Unity Test API

    Simple Unit Testing for C

  • I have recently gotten back into hobby programming and have downloaded the Unity unit testing library for c from Github. In future, I would like to use this library for all projects and don't want to keep copying it over / referring to it's path during compilation. What is the recommended method of doing this? I have attempted to create a .so file and store it in /usr/local/lib (which is a search directory for the linker) as detailed in this video but that hasn't really worked. The error I get when attemtping this is a simple "undefined reference to etc", so it can't find it. I also attempted copying the two .h files (unity.h and unity_internals.h) into /usr/include and changing the include statements from #include "unity.h" to #include and recompiling but that didn't help. Is there a way for me to store the library in my home directory somewhere as opposed to under root?

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts