Frameworks are, more or less, a Mac way of packaging applications. These applications might contain code + headers + libraries we want to use. The line
-F/Library/Frameworks/R.framework/..
says, "look in the folder /Library/Frameworks
for any frameworks that get specified", and
-framework R
says, "look for the folder R.framework
in the set of 'frameworks' directories".
Note that the -framework R
argument is actually handled by ld
, not gcc
/clang
, so you would find more information in man ld
. The -F
argument, on the other hand, is handled by gcc
/clang
. Together, they allow your compiler and linker to find headers and libraries needed.
In particular, on Mac, they are located (by default) as /Library/Frameworks/R.framework/Headers
and /Library/Frameworks/R.framework/Libraries
-- these are the directories scoured by setting the appropriate framework flags.
More information is available here for the -F argument and for the -framework argument.