buginux / WeChatRedEnvelop

iOS版微信抢红包Tweak
2.26k stars 576 forks source link

make报错 #39

Closed Zxxxx closed 7 years ago

Zxxxx commented 7 years ago

10 errors generated. make[3]: [.theos/obj/armv7/Tweak.xm.b19f927a.o] Error 1 make[2]: [.theos/obj/armv7/WeChatRedEnvelop.dylib] Error 2 make[1]: [internal-library-all_] Error 2 make: [WeChatRedEnvelop.all.tweak.variables] Error 2

buginux commented 7 years ago

光靠这个错误信息是无法确定错误的,请确保你安装了最新的 theos 环境。同时提供更详细的信息。

TLcv commented 7 years ago

@buginux 我安装完了还是报错 make[3]: No rule to make target /Users/jiyan/Documents/iOS资料/工?', needed by/Users/jiyan/Documents/iOS资料/工具类/WeChatRedEnvelop/.theos/obj/debug/armv7/WeChatRedEnvelop.dylib'. Stop. make[2]: [/Users/jiyan/Documents/iOS资料/工具类/WeChatRedEnvelop/.theos/obj/debug/armv7/WeChatRedEnvelop.dylib] Error 2 make[1]: [internal-library-all_] Error 2 make: [WeChatRedEnvelop.all.tweak.variables] Error 2

buginux commented 7 years ago

命令行执行下 export THEOS=/opt/theos

TLcv commented 7 years ago

@buginux 执行过了,还是一样的结果!免越狱版的Makefile需要改吗?

marktube commented 7 years ago

@TLcv 把makefile改成下面这个试试,原来的Makefile是编译tweak的,这个是编译出dylib的,加上了substrate的依赖

THEOS_DEVICE_IP = localhost

THEOS_DEVICE_PORT = 2222

ARCHS = armv7 arm64 TARGET = iphone:latest:9.2

include theos/makefiles/common.mk

TWEAK_NAME = WeChatRedEnvelop

LIBRARY_NAME = WeChatRedEnvelop WeChatRedEnvelop_FILES = Tweak.xm XGPayingViewController.m WeChatRedEnvelop_FRAMEWORKS = UIKit WeChatRedEnvelop_LIBRARIES = substrate

include $(THEOS_MAKE_PATH)/library.mk

after-install::

install.exec "killall -9 WeChat"

TLcv commented 7 years ago

@marktube 一样的报错,THEOS_DEVICE_IP = 192.168.2.2 THEOS_DEVICE_PORT = 22 这两个改了之后也一样

buginux commented 7 years ago

@TLcv 你有安装最新版的 theos 环境吗

TLcv commented 7 years ago

@marktube 昨天刚装的

marktube commented 7 years ago

@TLcv Tweak.xm里面的UIAlertView在ios8以后被弃用了,看看你iphone sdk的版本,可能需要修改一下Tweak.xm我当时也是make时出错,具体还是看看make出错信息慢慢调试。

greezi commented 7 years ago

我也遇到这个问题了,改了 Makefile文件以后报错: WeChatRedEnvelop git:(master) ✗ make
Makefile:34: *** missing separator. Stop.

greezi commented 7 years ago

WeChatRedEnvelop git:(master) make

Making all for tweak WeChatRedEnvelop… make[3]: No rule to make target /Users/tudou/Desktop/微信红?', needed by/Users/tudou/Desktop/微信红包/WeChatRedEnvelop/.theos/obj/debug/armv7/WeChatRedEnvelop.dylib'. Stop. make[2]: [/Users/tudou/Desktop/微信红包/WeChatRedEnvelop/.theos/obj/debug/armv7/WeChatRedEnvelop.dylib] Error 2 make[1]: [internal-library-all_] Error 2 make: [WeChatRedEnvelop.all.tweak.variables] Error 2

buginux commented 7 years ago

@greezi 你这是目录命名有问题吧,改成英文目录试试。

fightingForYou commented 7 years ago

ox 10.12 好像没法装dpkg, 是不是也没法装thoes了

quanchengk commented 7 years ago

系统版本10.11.6 执行make同样遇到了UIAlertView的问题

Tweak.xm:143:2049: error: 'UIAlertView' is deprecated: first deprecated in iOS 9.0 - UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyleAlert instead [-Werror,-Wdeprecated-declarations] ...), strlen(@encode(UIAlertView ))); i += strlen(@encode(UIAlertView *))... ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UIAlertView.h:26:12: note: 'UIAlertView' has been explicitly marked deprecated here @interface UIAlertView : UIView ^ 10 errors generated. make[2]: [obj/Tweak.xm.3e167f9f.o] Error 1 make[1]: [internal-library-all_] Error 2 make: *** [WeChatRedEnvelop.all.library.variables] Error 2

buginux commented 7 years ago

是不是你 SDK 的问题,还是你下错了,我的 tweak 里面没有用到 UIAlertView,应该不会报 UIAlertView 的错才对。

nathanwhy commented 7 years ago
$ brew install dpkg ldid
$ brew install --HEAD hbang/repo/deviceconsole  # (not required, but very useful)

https://github.com/theos/theos/wiki/Installation#prerequisites

HolmesZhao commented 7 years ago

这是我的错误

Making all for tweak WeChatRedEnvelop... Preprocessing Tweak.xm... Compiling Tweak.xm... Tweak.xm:69:35: error: use of undeclared identifier 'MSHookIvar' MMTableViewInfo tableViewInfo = MSHookIvar(self, "m_tableVi... ^ Tweak.xm:69:46: error: unexpected type name 'id': expected expression MMTableViewInfo tableViewInfo = MSHookIvar(self, "m_tableVi... ^ Tweak.xm:69:50: error: expression result unused [-Werror,-Wunused-value] MMTableViewInfo *tableViewInfo = MSHookIvar(self, "mtableVi... ^~~~ 3 errors generated. make[2]: [obj/Tweak.xm.b770397b.o] Error 1 make[1]: [internal-library-all] Error 2 make: *** [WeChatRedEnvelop.all.tweak.variables] Error 2

HolmesZhao commented 7 years ago

这是我的makefile的内容,为什么会出现上面的错

THEOS_DEVICE_IP = localhost THEOS_DEVICE_PORT = 2222 ARCHS = armv7 arm64 TARGET = iphone:latest:7.0

include theos/makefiles/common.mk

TWEAK_NAME = WeChatRedEnvelop WeChatRedEnvelop_FILES = Tweak.xm XGPayingViewController.m WeChatRedEnvelop_FRAMEWORKS = UIKit

include $(THEOS_MAKE_PATH)/tweak.mk

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

buginux commented 7 years ago

这个应该是 theos 环境没配置好的原因。

HolmesZhao commented 7 years ago

请问有没有推荐的theos环境配置的博客

buginux commented 7 years ago

@HomlesZhao http://www.swiftyper.com/2016/01/25/ios-tweak-install-guide/