Search code examples
c++macoscompilationstatic-linking

c++ include frameworks using code or command line options


I want to compile and build a C++ program with clang compiler. (not with XCode).

I want to add built-in OSX frameworks into my code either using some code snippet (like #pragma comment(lib, xxx) for windows built-in libraries) or command line options.

How can this be done?

Thanks in advance.


Solution

  • For command line option we have to use: -framework frameworkname