新建theos subproject 跑不起来


#1

由于有几个项目用到一些共同的源文件。想把这个源文件做成library共享出来。

我参考了https://github.com/DHowett/theos-logos-examples/tree/master/theos.instance_subproject

根目录里有一个tweak项目,library项目放在libtest目录里

在tweak项目的makefile文件里加上依赖
ti_SUBPROJECTS= libtest

Makefile文件的内容如下:

include $(THEOS)/makefiles/common.mk

TWEAK_NAME = ti
ti_FILES = Tweak.xm
ti_SUBPROJECTS= libtest

include $(THEOS_MAKE_PATH)/tweak.mk

   after-install::
        install.exec "killall -9 SpringBoard"

结果就是编译报错了:

liaogangdeMac-mini:ti liaogang$ make package

Making all in subprojects of tweak ti…
Making all for library libtest…
==> Compiling libtest.mm (armv7)…
==> Linking library libtest (armv7)…
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of iOS 7 [-Wdeprecated]
==> Compiling libtest.mm (arm64)…
==> Linking library libtest (arm64)…
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of iOS 7 [-Wdeprecated]
==> Merging library libtest…
==> Signing libtest…
Making all for tweak ti…
==> Preprocessing Tweak.xm…
==> Compiling Tweak.xm (armv7)…
make[3]: *** No rule to make target libtest/obj/debug/*.subproject.o', needed by/Users/liaogang/theosTestProject/ti/.theos/obj/debug/armv7/ti.dylib’. Stop.
make[2]: *** [/Users/liaogang/theosTestProject/ti/.theos/obj/debug/armv7/ti.dylib] Error 2
make[1]: *** [internal-library-all_] Error 2
make: *** [ti.all.tweak.variables] Error 2