Skip to content

Commit 529921e

Browse files
committed
lib+common: Fix v.h linkage for dynamically linked build
`make lib` builds c-ray in two parts, `lib/libc-ray.so` and `lib/c-ray`. When I added v.h initially, I just placed the symbols in `lib/api/c-ray.c`, but doing it that way failed to export the symbols for the driver portion in `lib/c-ray`. Fix is to put the symbols in a new translation unit under `src/common`.
1 parent 6990604 commit 529921e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/common/v_impl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#define V_IMPLEMENTATION
2+
#include <v.h>

src/lib/api/c-ray.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <stdbool.h>
1414
#include <string.h>
1515

16-
#define V_IMPLEMENTATION
1716
#include <v.h>
1817

1918
#include <common/gitsha1.h>

0 commit comments

Comments
 (0)