Home / C++ / Building static, dynamic libs with clang edit
Try Documentalist, my app that offers fast, offline access to 190+ programmer API docs.

clang++ -std=c++14 -c -fpic static.cpp
ar rcs libstatic.a static.o
clagn++ -std=c++14 -c -fpic dynamic.cpp
clang++ -shared -o libdynamic.so dynamic.o -L./ -lstatic
clang++ -std=c++14 -c main.x.cpp
clang++ -L./ -Wl,-rpath=./ main.x.o -lstatic -ldynamic

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:

Share on        

Need fast, offline access to 190+ programmer API docs? Try my app Documentalist for Windows