marlkiller / dylib_dobby_hook

A macOS dylib project , aimed at enhancing and extending the functionality of target software.
MIT License
244 stars 73 forks source link

想请教一个关于dobby编译的问题 #12

Closed quert999 closed 7 months ago

quert999 commented 7 months ago

我编译出libdobby.dylib然后 gcc main.c -L. -I. -ldobby -o main 执行的时候就报错了 ./main
dyld[43158]: Symbol not found: _DobbyHook Referenced from: <9874E7BB-10B6-3E9D-BBCE-DBE1379425A1> /Users/xu/Desktop/run/main Expected in: unknown zsh: abort ./main 我使用dobby最新的release也会这样,这是啥问题啊

marlkiller commented 7 months ago

头文件加上了吗?

import "dobby.h"

quert999 commented 7 months ago

加了,用的release里的头文件

---原始邮件--- 发件人: @.> 发送时间: 2024年4月26日(周五) 晚上9:09 收件人: @.>; 抄送: @.**@.>; 主题: Re: [marlkiller/dylib_dobby_hook] 想请教一个关于dobby编译的问题 (Issue #12)

头文件加上了吗?

import "dobby.h"

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

quert999 commented 7 months ago

在xcode在link binary with libraries里引入dobby动态库构建会报错Library 'dobby' not found

quert999 commented 7 months ago

原来是运行的时候也要指定动态库 加上这句好了 DYLD_LIBRARY_PATH=/Users/xu/Desktop/run ./main