Results 1 to 4 of 4
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-15-2010 #1Just Joined!
- Join Date
- Sep 2009
- Posts
- 4
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.
Thanks!
- 09-16-2010 #2
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.
- 09-17-2010 #3Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,148
Post the contents of your Makefile here.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 09-17-2010 #4Just Joined!
- Join Date
- Sep 2009
- Posts
- 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!


Reply With Quote
