p2pvc
p2pvc copied to clipboard
Error around make
$ make
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO pkg-config --cflags opencv
src/audio.c -c -o objs/audio.o
src/audio.c:34:10: fatal error: 'portaudio.h' file not found
include <portaudio.h>
^
1 error generated. make: *** [objs/audio.o] Error 1
Hi, I believe I have installed portaudio properly, why does this show every time? I can see portaudio.h in my usr/local/include/, what should I do? Many thanks.
I got the same thing on Mac. Were you able to fix it?
Sry buddy, still no.. I've looked through net but can't get the solution
I solved it. See below first lines of Makefile until "all: p2pvc". Just add the other include dir with -I and a space between to the INCDIR and the same for the library with -L and a space on the LDFLAGS.
It's strange it doesn't look in /usr/local/include by default, but at least this will compile it. Hope this helps for you.
CC=gcc OBJDIR=objs SRCDIR=src INCDIR=$(SRCDIR)/inc -I/usr/local/include CFLAGS+=-I$(INCDIR) platform=$(shell uname -s)
SRCS=$(wildcard $(SRCDIR)/*.c) OBJS=$(patsubst $(SRCDIR)/%.c,$(OBJDIR)/%.o,$(SRCS))
CFLAGS+=-O2 -Wall
ifeq ($(platform), Linux)
CFLAGS+=-DPA_USE_ALSA
else
CFLAGS+=-DPA_USE_COREAUDIO
endif
CFLAGS+=pkg-config --cflags opencv
CFLAGS_DEBUG+=-O0 -g3 -Werror -DDEBUG
LDFLAGS+=-lpthread -lncurses -lportaudio -lm
LDFLAGS+=pkg-config --libs opencv
-L/usr/local/lib
Thanks a loooooot!