Contour control in Linux programs

I have a Linux programming question for beginners. Suppose I have a project that uses Autotools to compile and deploy, and I have data files that need to be installed in a place like /var/somethingor /usr/share/somethingetc. But in Autoconf I can change these installation paths. How should a program find these files? How does he know where they are actually installed (if anywhere, since the program should work, even if it is not installed, but starts from the place where it was created)?

+3
source share
1 answer

Usually, if your program depends on files stored in a specific place that are configured by the build system, you should pass this path as a compiler definition, and in your program use this definition where you need it.

+5
source

Source: https://habr.com/ru/post/1750108/


All Articles