Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Why does my installer copy *.h into /usr/include

    I am working on a Linux embedded C++ project. When I do an install, all of the header files are copied into the target at /usr/include/.

    My question is, why would the target ever need the C++ header files? It seems to me all the target needs is the executables and the library *.so files.

    I want to remove the installation of header files into the target but I'm afraid I'm missing something.


  2. #2
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Seattle, WA, USA
    If you're writing a library, then in your .so files, you have defined functions for the user to call. In order for the user to compile a program using those functions, they need a header file to give the interfaces to those functions.

    If you are writing an application, not a library, you may have your Makefile compiled wrong. If are writing an application, the user does not need your header files.

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Post the contents of your Makefile here.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  4. $spacer_open
  5. #4


    There are several makefiles, scripts, etc. It is very complex.

    Now I understand the purpose of the include header files. I am building a shared library and I'm compiling against it. the shared library header files are available for the compile. However, the shared library header files are also getting installed in the embedded target. They don't need to be. I'll remove that step in the install target.

    I appreciate your help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts