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
I tried to do this but when I add a test that uses c_allocator to heap.zig, I get a mysterious linker error when I run the tests
lld: error: duplicate symbol: _start
>>> defined at init.c
>>> /usr/lib/gcc/x86_64-pc-linux-gnu/7.2.0/../../../../lib/Scrt1.o:(_start)
>>> defined at bootstrap.zig:16 (/home/scurest/zig/build/lib/zig/std/special/bootstrap.zig:16)
>>> ./zig-cache/test.o:(.text+0x6FC00)
The text was updated successfully, but these errors were encountered:
I see that in addPkgTests in tests/tests.zig, it adds the tests once with and once without linking libc. So is the right thing to do to just guard the test that needs it with if (builtin.link_libc)?
gives
error: redeclaration of variable 'mem'
athttps://github.com/zig-lang/zig/blob/4cc9fe90a8a3c0bce803bf9fffd66477da9e37d0/std/heap.zig#L20
mem
just needs to be renamed. Same forcRealloc
.I tried to do this but when I add a test that uses
c_allocator
toheap.zig
, I get a mysterious linker error when I run the testsThe text was updated successfully, but these errors were encountered: