Skip to contentSkip to conversation

examples: Add src/ into the include and library path

PATCH In review Han Han 2 participants 2 messages Oct 20, 2020 NVMe

lore
Share & tools
lore

Han Han

author
#0 lore raw

PATCH 1/1 examples: Add src/ into the include and library path

That will fix the compiling errors like:
CC telemetry-listen
telemetry-listen.c:21:10: fatal error: libnvme.h: No such file or directory
21 | #include <libnvme.h>

      |          ^~~~~~~~~~~
---
 examples/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/Makefile +1 -1
index be867a7..24f8574 100644
@@ -1,5 +1,5 @@
 CFLAGS ?= -g -O2
-override CFLAGS += -Wall -D_GNU_SOURCE
+override CFLAGS += -Wall -D_GNU_SOURCE -I ../src -L ../src
 
 include ../Makefile.quiet
 
Signature · 7 lines
2.26.2


_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
maintainer
#1 lore raw

examples/Makefile line 2

Quoted 8 lines · Han Han
examples/Makefile +1 -1
index be867a7..24f8574 100644
@@ -1,5 +1,5 @@
 CFLAGS ?= -g -O2
-override CFLAGS += -Wall -D_GNU_SOURCE
+override CFLAGS += -Wall -D_GNU_SOURCE -I ../src -L ../src

I guess the examples assumed the library was installed, but that doesn't make sense if you're testing within the repo. Patch applied, thank you.

_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme