You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
xmake build -v test
checking for gcc ... /usr/bin/gcc
checking for zig ... no
checking for zig ... no
checking for nim ... no
checking for nim ... no
checking for gcc ... /usr/bin/gcc
checking for the c compiler (cc) ... gcc
checking for /usr/bin/gcc ... ok
checking for flags (-fPIC) ... ok
[ 50%]: cache compiling.release dep.c
/usr/bin/gcc -c -m64 -I. -o build/.objs/lib/linux/x86_64/release/dep.c.o dep.c
checking for flags (-MMD -MF) ... ok
checking for flags (-fdiagnostics-color=always) ... ok
checking for the c compiler (cc) ... gcc
[ 50%]: cache compiling.release main.c
/usr/bin/gcc -c -m64 -I. -o build/.objs/test/linux/x86_64/release/main.c.o main.c
checking for ar ... /usr/bin/ar
checking for the static library archiver (ar) ... ar
[ 62%]: archiving.release liblib.a
/usr/bin/ar -cr build/linux/x86_64/release/liblib.a build/.objs/lib/linux/x86_64/release/dep.c.o
checking for g++ ... /usr/bin/g++
checking for the linker (ld) ... g++
checking for /usr/bin/g++ ... ok
checking for flags (-fPIC) ... ok
[ 87%]: linking.release test
/usr/bin/g++ -o build/linux/x86_64/release/test build/.objs/test/linux/x86_64/release/main.c.o -m64
/usr/bin/ld: build/.objs/test/linux/x86_64/release/main.c.o: in function `main':
main.c:(.text+0xe): undefined reference to `fun'
collect2: error: ld returned 1 exit status
error: execv(/usr/bin/g++ -o build/linux/x86_64/release/test build/.objs/test/linux/x86_64/release/main.c.o -m64) failed(1)
The text was updated successfully, but these errors were encountered:
Bot detected the issue body's language is not English, translate it automatically.
Do not put set kind in on_config, because the link inheritance of deps target is currently processed in the on_config stage. If you set set kind too late, you will not be able to inherit the dep link.
Just as i thought design limitation. Well it's a bit unsettling not being able to define kind in package rules maybe i just completely misunderstanding rules initial purpose when trying to use it as target templates which probably better to do other way.
Will be any warning given when trying to set it in on_config stage and/or package rules?
Xmake 版本
xmake v2.8.9+HEAD.cb1b650
操作系统版本和架构
Linux energostalinpc 6.8.5-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 11 Apr 2024 01:47:33 +0000 x86_64 GNU/Linux
描述问题
Since it seems to somehow allow building library i expect it to link it as well. Setting it inside
on_load
it works fine.Honestly looks like design limitation but then i wonder what's the point in allowing building static library without being able to link it?
The main concern however is whether it possible to include
kind
into rule package or not.期待的结果
Link to target.
工程配置
https://github.com/EnergoStalin/xmake-kind-bug
附加信息和错误日志
Log
The text was updated successfully, but these errors were encountered: