Skip to content
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

使用export_list后xmake project -k xcode报错 #5253

Open
shuax opened this issue Jun 25, 2024 · 1 comment
Open

使用export_list后xmake project -k xcode报错 #5253

shuax opened this issue Jun 25, 2024 · 1 comment
Labels

Comments

@shuax
Copy link
Contributor

shuax commented Jun 25, 2024

Xmake 版本

2.9.3

操作系统版本和架构

macOS 14.5 (23F79)

描述问题

我使用了


    add_files("src/xxxexport.txt")
    add_rules("utils.symbols.export_list")

来导出函数,然后就不能生成xcode工程了,具体是cmake就生成失败,错误代码在这里。

if cmake_minver:ge("3.12.0") and #os.argv(flag) > 1 then

我添加了2行调试。

                print("1",flag)
                flag = _escape_path_in_flag(target, flag)
                print("2",flag)

打印结果是这样的。

xmake project -k xcode
checking for Xcode directory ... /Applications/Xcode.app
checking for Codesign Identity of Xcode ... no
checking for SDK version of Xcode for macosx (arm64) ... 14.5
checking for Minimal target version of Xcode for macosx (arm64) ... 14.5
1 -target
2 -target
1 arm64-apple-macos14.5
2 arm64-apple-macos14.5
1 -isysroot
2 -isysroot
1 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk
2 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk
1 -lz
2 -lz
1 { 
  "-Wl,-exported_symbols_list",
  "build/.gens/xxx/macosx/arm64/release/rules/symbols/export_list.exp",
  __wrap_locked__ = true 
}

2 { 
  "-Wl,-exported_symbols_list",
  "build/.gens/xxx/macosx/arm64/release/rules/symbols/export_list.exp",
  __wrap_locked__ = true 
}

error: bad argument #1 to 'argv' (string expected, got table)

期待的结果

能正常生成cmake

工程配置

add_files("src/xxxexport.txt")
add_rules("utils.symbols.export_list")

附加信息和错误日志

error: bad argument #1 to 'argv' (string expected, got table)

@shuax shuax added the bug label Jun 25, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: xmake project -k xcode reports an error after using export_list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants