1

There is a library (Xcode project intended to add as subproject) with plenty of small static libraries. The user can decide to use some of them, or all of them. To ease setup for the user who decides to use all of them I would like to create one bigger, "container" static library, which would contain all the smaller static libraries.

The problem is, that after adding to the new app, the container library is not built, unless I add at least one dummy source file.

The compiler error is ld: library not found for -lContainerLibraryName clang: error: linker command failed with exit code 1 (use -v to see invocation)

This dummy source file might be empty, no properties, no methods. Does anyone out there know, why the static library needs to include at least one source file? Otherwise it will not build, even if it contains other static libraries.

Is there any way to force static library to build even if it does not contain any source file?

4

1 回答 1

0

您应该尝试将 -all_load 添加到构建设置下的“其他链接器标志”中。

于 2012-11-19T22:25:26.693 回答