Do I need to explicitly include a common header file(in an include path folder) used in shared library?
问题 I am using a shared library , say, shr.so . This has some header file, say, shr_struct.h with structures I need to use in my program , say, main_prog.c . Do I need to keep a copy of shr_struct.h in my include path so that I can declare objects of structure types in shr_struct.h in main_prog.c ? 回答1: If your main_prog.c depends on shr_struct.h , the compiler will need to know where this last file is located. Now if the library is installed in the system "standard" library path, you may not