-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.
Milestone
Description
Zig Version
0.15.2
Steps to Reproduce and Observed Behavior
> cat test.c
#include <resolv.h>
#include <stdio.h>
#include <string.h>
int main() {
const char *s = "test";
char out[sizeof s << 1];
b64_ntop((const unsigned char *) s, strlen(s), out, sizeof out);
printf("%s\n", out);
}
> clang -Wall test.c -o test -lresolv`
> ./test
dGVzdA==
> zig cc -Wall test.c -o test -lresolv
ld.lld: error: undefined symbol: __b64_ntop
>>> referenced by test.c:9
>>> /home/michael/.cache/zig/o/d3eb4eae11967bfaa9bf667ce900d74b/test.o:(main)
Under FreeBSD it is working fine without -lresolv
Expected Behavior
I expect zig cc to resolve symbols (in system libc/libresolv/zigs musl libc)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorfrontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.