We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
2.9.8
windows 11 x64, msvc 14.43
#2121 https://github.com/xmake-io/xmake/tree/dev/tests/projects/c/shared_library_export_list 上述示例中,无论是link foo还是foo2都无法link add sub函数 是不是Windows必须dllexport才行
添加utils.symbols.export_all后没有标记dllexport的c++符号可以被其他模块link
#pragma once #ifdef __cplusplus //extern "C" { #endif int add(int a, int b); #ifdef __cplusplus //} #endif
add_rules("mode.release", "mode.debug") target("foo") set_kind("shared") add_files("src/foo.c") add_rules("utils.symbols.export_list", {symbols = { "add", "sub"}}) target("foo2") set_kind("shared") add_files("src/foo.c") add_files("src/foo.export.txt") add_rules("utils.symbols.export_list") target("test") set_kind("binary") add_deps("foo") add_files("src/main.c")
LINK : error LNK2001: unresolved external symbol _DllMainCRTStartup foo2.exp : error LNK2001: unresolved external symbol add foo2.exp : error LNK2001: unresolved external symbol sub build\windows\x64\release\foo2.dll : fatal error LNK1120: 3 unresolved externals
The text was updated successfully, but these errors were encountered:
Bot detected the issue body's language is not English, translate it automatically.
Title: utils.symbols.export_all/list Can C++ symbols be exported?
Sorry, something went wrong.
https://xmake.io/#/manual/custom_rule?id=utilssymbolsexport_all
看上面的文档,都有详细说明,支持 c++
Look at the above documentation, there are detailed instructions, support C++
找到例子了 https://github.com/xmake-io/xmake/blob/dev/tests/projects/c%2B%2B/shared_library_export_all/xmake.lua
No branches or pull requests
Xmake 版本
2.9.8
操作系统版本和架构
windows 11 x64, msvc 14.43
描述问题
#2121
https://github.com/xmake-io/xmake/tree/dev/tests/projects/c/shared_library_export_list
上述示例中,无论是link foo还是foo2都无法link add sub函数
是不是Windows必须dllexport才行
期待的结果
添加utils.symbols.export_all后没有标记dllexport的c++符号可以被其他模块link
工程配置
附加信息和错误日志
The text was updated successfully, but these errors were encountered: