saprykin / plibsys

Highly portable C system library: threads and synchronization primitives, sockets (TCP, UDP, SCTP), IPv4 and IPv6, IPC, hash functions (MD5, SHA-1, SHA-2, SHA-3, GOST), binary trees (RB, AVL) and more. Native code performance.
MIT License
672 stars 74 forks source link

Header files not using relative includes. #95

Closed ghost closed 1 year ago

ghost commented 2 years ago

Some of your header files still use angled brackets (< and >), which requires someone to include the folder these headers reside during compilation.

Better solution is to just use quotes, which you seem to have used in plibsys.h, but every other header seems to use the angled brackets.

Currently this breaks me being able to use the library outside of placing the whole git repo in my project's directory. As my headers reside in one folder deeper than my default system-wide include folder.

plibsys/plibsys.h as an example.

This is a relatively simple fix, as well.

saprykin commented 1 year ago

The idea behind is to only use plibsys.h header in a program, the rest headers should never be included by hand. For that, you typically use CMake and add an include path. In general, installation can be different and you should not rely on relative paths.