stclib / STC

A modern, user friendly, generic, type-safe and fast C99 container library: String, Vector, Sorted and Unordered Map and Set, Deque, Forward List, Smart Pointers, Bitset and Random numbers.
MIT License
1.33k stars 72 forks source link

Better installation Instructions #55

Open VisenDev opened 1 year ago

VisenDev commented 1 year ago

Hi, I would really appreciate some more clear installation instructions for this library. But it is extremely unclear how I am supposed to get this thing working on my system.

I download the library, I run cmake . then I run make Then how do I install the library and make it accessible to pkg-config?

tylov commented 1 year ago

The library is primarily intended as header-only and therefore it need no installation. However, the non-templated objects (particularly cstr, cregex) would be nice to have accessible as a library, as cstr is typically used a lot if applied in an application. I will look into this.

If you want to "reuse" templated containers over many translation units, use the "Installation" instruction in the documentation to create shared objects/library to link with your application. But note: You will not see binary size reduction (in fact the opposite) unless you reuse the same templated container type in more than 3 or 4 translation units, or call push/insert/erase a lot of places. One example of that may be containers of primitive types, as they often can be used for multiple purposes.