-
-
Notifications
You must be signed in to change notification settings - Fork 784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在macos上set_kind(shared)时与-bundle 不相容 #687
Comments
既然cc都明确提示了:-bundle not allowed "dynamiclib" 那就说明-bundle flag不能用于动态库生成上,那为啥还要设置到 set_kind shared的动态库target上去呢。 shared target仅用于生成动态库,不支持bundle生成。。 https://docstore.mik.ua/orelly/unix3/mac/ch05_03.htm
目前xmake原生没提供bundle的直接生成,你可以自己加add_ldflags -bundle到binary target上去来生成bundle,如果后缀名不对,你自己通过 set_filename 自行改下后缀名 |
ok |
我bundle支持上了,可以更新到dev分支试试 add_rules("mode.debug", "mode.release")
target("test")
add_rules("xcode.bundle")
add_files("src/test.m")
add_files("src/Info.plist") 也可以通过模板创建空工程: xmake create -t xcode.bundle -l objc test |
签名支持我改进了下,只需要设置即可(而且默认会自动检测选择一个可用的,也不用每次手动配置): xmake f --xcode_codesign_identity="Apple Development: xxx@gmail.com (T3NA4MRVPU)" 当然, |
恩,我稍微改进了下,info.plist统一放置到 add_files里面去,add_installfiles用于resources文件的安装 |
Describe the bug
在macos上编译动态库,
target("example")
set_kind(shared)
add_shflags("-bundle -undefined dynamic_lookup",{force=true})
编译时提示 -bundle not allowed "dynamiclib"
Expected behavior
在最后连接的时候 cc -o -bundle -undefined dynamic_lookup,而不是cc -o -shared
The text was updated successfully, but these errors were encountered: