Problem
I need my code to compile on a machine that cannot leverage apt-get
to install nonstandard C++ libraries but my C++ program has a single #include
for an external library that I must use. That library includes many headers and other libraries, meaning that my makefile
has many -l
and -I
to /usr/include/...
and /usr/lib/...
pointing to my apt-get
installed libraries.
What I want
Rather than manually going through and grabbing all of these libraries so that I can include them in my project directory, I am hoping there is a command or flag for make or g++ that will dump all the libraries and headers into a directory for me.
Progress
This and this have helped because adding the -MMD
flag to my g++ compile command will dump out a list of about 100 header file locations. But I would like g++ to go one step further and actually do the work of gathering them all together for me, if that feature exists.