1) man foo
2) notice the "#include <blah.h>"
3) Inject the include into the troublesome file; FoohBlah.cpp
----a) You may use "#include "blah.h" or "#include <blah.h>"
----b) It is advised to prepend a c and remove .h instead since we're dealing with c files and headers; "#include <cblah>"
So in this case, it looks like RtAudio.cpp would need <cstring> and <cstdlib>. I would do the following from the build dir:
sed -i '-e/#/{;s/#/#include <cstring>\n#include <cstdlib>\n#/;:a' '-en;ba' '-e}' $(find -name RtAudio.cpp)
Maybe awk will be shorter but I don't know enough of it.
_______________________________________________ Linux-audio-user mailing list Linux-audio-user@xxxxxxxxxxxxxxxxxxxx http://lists.linuxaudio.org/mailman/listinfo/linux-audio-user