So I create a library. I want to use shared ffmpeg libs. On mac os with xcode. I create project file with premake4. Shall I connectsha开发者_运维知识库red libs to my project or shall I only connect includes?
If I understand your question correctly, you're asking if you need both the shared libraries and the headers, or just the headers, for your project to work.
You need both. The libraries are generally were the actual code for the functions and classes declared in the headers lives. Your project will compile just fine with only the headers present, but unless there is corresponding code in a lib or shared lib, you can count on linker errors.
I have to say I'm not familiar with the actual build process on OS X, but I believe the above is inherent to any C/C++ project regardless of OS.
Also, since you're probably working with the Standard Library you might have the impression that all you're doing is #include
ing headers (iostream
, stdio.h
, etc), but the libraries are still there and have been added by default by your IDE.
精彩评论