I am compiling a program called CCExtractor in Terminal on a Mac. The program is downloaded as source code, and the developer includes this ...
|
g++ -Dfopen64=fopen -Dopen64=open -Dlseek64=lseek -I../src/gpacmp4 -I ../src/libpng -I ../src/zlib -o ccextractor $(find ../src/ -name '*.cpp') $(find ../src/ -name '*.c')
|
... as a g++ command line for compiling it. It doesn't work, giving me an "illegal variable name" error. I can intuit what the "$(find ... )" specifications are supposed to mean, and if I manually do the equivalent "find" commands and replace the "$(find ... )" specifications with the results of the manual "find" commands, the g++ command works and produces a good executable.
My first question is, is "$(find ... )" a meaningful specification in Mac g++ commands, and if so why doesn't it work as originally specified? (BTW, before using the g++ command, I do a "cd" (change directory) to the proper directory so that things like
|
find ../src/ -name '*.cpp'
|
work as intended.)
If "$(find ... )" is not a proper way to locate all the intended source files, can anyone tell me why the software's author thought it was.
BTW, I am admittedly not well versed in using Unix or g++ ... in Terminal on a Mac or on any other machine. Please forgive me if I am asking dumb questions.
Another possibly dumb question is, how can I tell if my CCExtractor executable uses any dynamic or shared libraries? I am in touch with someone who wants to know, as he might want to distribute my CCExtractor executable to other Mac users as a useful tool to accompany his "kmttg" software. If the executable uses shared libraries, it might break if those libraries aren't present. How can I tell if this might become a problem?
Thanks for any help anyone can provide.