Closed ririyeye closed 1 month ago
Bot detected the issue body's language is not English, translate it automatically.
Title: Adding add_ldflags when generating swig does not take effect
so 库得用 add_shflags, add_ldflags 是给 可执行文件用的,不是动态库。
Bot detected the issue body's language is not English, translate it automatically.
The use of so library add shflags and add_ldflags are for executable files, not dynamic libraries.
so 库得用 add_shflags, add_ldflags 是给 可执行文件用的,不是动态库。
好的 我搞错了
Bot detected the issue body's language is not English, translate it automatically.
so library must use add_shflags, add_ldflags is for executable files, not dynamic libraries.
ok i made a mistake
Xmake 版本
v2.8.5+master
操作系统版本和架构
ubuntu23.10
描述问题
使用库中自带的swig工程 tests/projects/swig/python_c/xmake.lua 添加
add_ldflags("11111111111111111111111111111111" , {force = true}) 链接时没有添加改参数 add_cxflags 这个是生效的 add_ldflags 不生效
期待的结果
最后链接中添加1111链接参数
工程配置
xmake 库中自带的swig工程 tests/projects/swig/python_c/xmake.lua
附加信息和错误日志
[ 40%]: compiling.swig.python src/example.i /usr/bin/swig -python -o build/.gens/example/linux/x86_64/release/rules/swig/example.c -I/usr/include/python3.12 src/example.i /usr/bin/gcc -c -m64 -fPIC -O3 -isystem /usr/include/python3.12 -DNDEBUG -o build/.objs/example/linux/x86_64/release/gens/rules/swig/example.c.o build/.gens/example/linux/x86_64/release/rules/swig/example.c [ 80%]: linking.release _example.so /usr/bin/g++ -o build/linux/x86_64/release/_example.so build/.objs/example/linux/x86_64/release/src/example.c.o build/.objs/example/linux/x86_64/release/gens/rules/swig/example.c.o -shared -m64 -fPIC -L/usr/lib/x86_64-linux-gnu -s -lpython3.12 -lssl -lcrypto 链接参数没有 11111111111111111111111111111111