MJx0 / KittyMemory

This library aims for runtime code patching for both Android and iOS
MIT License
327 stars 113 forks source link

Error in compilation #26

Closed Leeksov closed 1 month ago

Leeksov commented 8 months ago

Undefined symbols for architecture arm64: "_ks_asm", referenced from: ZN11MemoryPatch13createWithAsmEm11MP_ASM_ARCHRKNSt3112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEm in MemoryPatch.cpp.cdf2922f.o "_ks_close", referenced from: ZN11MemoryPatch13createWithAsmEm11MP_ASM_ARCHRKNSt3112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEm in MemoryPatch.cpp.cdf2922f.o "_ks_errno", referenced from: ZN11MemoryPatch13createWithAsmEm11MP_ASM_ARCHRKNSt3112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEm in MemoryPatch.cpp.cdf2922f.o "_ks_free", referenced from: ZN11MemoryPatch13createWithAsmEm11MP_ASM_ARCHRKNSt3112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEm in MemoryPatch.cpp.cdf2922f.o "_ks_open", referenced from: ZN11MemoryPatch13createWithAsmEm11MP_ASM_ARCHRKNSt3112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEm in MemoryPatch.cpp.cdf2922f.o "_ks_strerror", referenced from: __ZN11MemoryPatch13createWi

Leeksov commented 8 months ago

i'm add this to makefile: $(TWEAK_NAME)_OBJ_FILES = $(KITTYMEMORY_PATH)/Deps/Keystone/libs-ios/$(THEOS_CURRENT_ARCH)/libkeystone.a

and after it get this: make[3]: No rule to make target '/KittyMemory/Deps/Keystone/libs-ios/arm64/libkeystone.a', needed by '/home/leeksov/carxstreet/.theos/obj/arm64/carxstreet.dylib'. Stop. make[3]: Waiting for unfinished jobs....

Leeksov commented 8 months ago

I corrected the previous error by writing this: $(TWEAK_NAME)_OBJ_FILES = KittyMemory/Deps/Keystone/libs-ios/$(THEOS_CURRENT_ARCH)/libkeystone.a

But again I got a new one: Undefined symbols for architecture arm64e: "ZN11KittyMemory18getAbsoluteAddressEPKcm", referenced from: Z13getRealOffsety in Tweak.xm.7d0af127.o "ZN11MemoryPatch13createWithHexEPKcmRKNSt3112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE", referenced from: -[OffsetSwitch initHackNamed:description:offsets:bytes:] in Menu.mm.7d0af127.o "ZN11MemoryPatch13createWithHexEmNSt3112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE", referenced from: Z11patchOffsetyNSt3112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE in Tweak.xm.7d0af127.o "ZN11MemoryPatch6ModifyEv", referenced from: Z11patchOffsetyNSt3112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE in Tweak.xm.7d0af127.o Z18restoreLastSessionv in Menu.mm.7d0af127.o -[Menu switchClicked:] in Menu.mm.7d0af127.o "ZN11MemoryPatch7RestoreEv", referenced from: Z18restoreLastSessionv in Menu.mm.7d0af127.o -[Menu switchClicked:] in Menu.mm.7d0af127.o "ZN11MemoryPatchD1Ev", referenced from: Z11patchOffsetyNSt3112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE in Tweak.xm.7d0af127.o -[OffsetSwitch initHackNamed:description:offsets:bytes:] in Menu.mm.7d0af127.o ZNSt3113vector_baseI11MemoryPatchNS_9allocatorIS1_EEED2Ev in Menu.mm.7d0af127.o ZNSt3114__split_bufferI11MemoryPatchRNS_9allocatorIS1_EEED2Ev in Menu.mm.7d0af127.o "ZNK11MemoryPatch7isValidEv", referenced from: Z11patchOffsetyNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE in Tweak.xm.7d0af127.o -[OffsetSwitch initHackNamed:description:offsets:bytes:] in Menu.mm.7d0af127.o ld: symbol(s) not found for architecture arm64e

HaidarPhantom commented 6 months ago

I corrected the previous error by writing this: (TWEAKNAME)OBJFILES=KittyMemory/Deps/Keystone/libs−ios/(THEOS_CURRENT_ARCH)/libkeystone.a

But again I got a new one: Undefined symbols for architecture arm64e: "ZN11KittyMemory18getAbsoluteAddressEPKcm", referenced from: Z13getRealOffsety in Tweak.xm.7d0af127.o "ZN11MemoryPatch13createWithHexEPKcmRKNSt3112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE", referenced from: -[OffsetSwitch initHackNamed:description:offsets:bytes:] in Menu.mm.7d0af127.o "ZN11MemoryPatch13createWithHexEmNSt3112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE", referenced from: Z11patchOffsetyNSt3112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE in Tweak.xm.7d0af127.o "ZN11MemoryPatch6ModifyEv", referenced from: Z11patchOffsetyNSt3112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE in Tweak.xm.7d0af127.o Z18restoreLastSessionv in Menu.mm.7d0af127.o -[Menu switchClicked:] in Menu.mm.7d0af127.o "ZN11MemoryPatch7RestoreEv", referenced from: Z18restoreLastSessionv in Menu.mm.7d0af127.o -[Menu switchClicked:] in Menu.mm.7d0af127.o "ZN11MemoryPatchD1Ev", referenced from: Z11patchOffsetyNSt3112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE in Tweak.xm.7d0af127.o -[OffsetSwitch initHackNamed:description:offsets:bytes:] in Menu.mm.7d0af127.o ZNSt3113vector_baseI11MemoryPatchNS_9allocatorIS1_EEED2Ev in Menu.mm.7d0af127.o ZNSt3114__split_bufferI11MemoryPatchRNS_9allocatorIS1_EEED2Ev in Menu.mm.7d0af127.o "ZNK11MemoryPatch7isValidEv", referenced from: Z11patchOffsetyNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE in Tweak.xm.7d0af127.o -[OffsetSwitch initHackNamed:description:offsets:bytes:] in Menu.mm.7d0af127.o ld: symbol(s) not found for architecture arm64e

did you fix this ? i have the same problem

MJx0 commented 5 months ago

undefined symbols means you did not add the source files to your $(TWEAK_NAME)_FILES