iosjailbreaktheostweak

How to include files in Tweak.xm from subproject library in Theos


I've created a simple tweak using Theos. Then, also using Theos templates I created a library in my tweak, and it was automatically added as a subproject, exactly as I need, in my tweak's Makefile were added the following two lines:

SUBPROJECTS += alertlib
include $(THEOS_MAKE_PATH)/aggregate.mk

The question is: how can I include/access files from newly created library in Tweak.xm file? Tried to import, but without success, I'm receiving Undefined symbols for architecture armv7 error.


Solution

  • TWEAKNAME_FILES=Tweak.xm YOURNEWCODE

    Example:

    include $(THEOS)/makefiles/common.mk
    
    TWEAK_NAME = Kit
    Kit_FILES = Tweak.xm SomeClass.mm
    include $(THEOS_MAKE_PATH)/tweak.mk  
    BLAH BLAH