-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorcontributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.frontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.
Milestone
Description
Version 0.6.0
- Files/
- foo.c
- foo.h
- main.c
Running zig cc -fPIC -c foo.c -o foo.o and zig cc -shared foo.o -o libbar.so successfully creates a shared library; however, when trying to link to the library, zig cc main.c -L. -lbar -o driver, the wrong name is used (libfoo.so.0). It seems like Zig cc uses the first object file of the library instead of the name of the shared library.
This code works fine if I change zig cc -shared foo.o -o libbar.so to zig cc -shared foo.o -o libfoo.so.
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorcontributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.frontendTokenization, parsing, AstGen, Sema, and Liveness.Tokenization, parsing, AstGen, Sema, and Liveness.