Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error around make #41

Open
seagullbird opened this issue Mar 28, 2016 · 4 comments
Open

Error around make #41

seagullbird opened this issue Mar 28, 2016 · 4 comments

Comments

@seagullbird
Copy link

$ 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.

@atv2016
Copy link

atv2016 commented Apr 14, 2016

I got the same thing on Mac. Were you able to fix it?

@seagullbird
Copy link
Author

Sry buddy, still no.. I've looked through net but can't get the solution

@atv2016
Copy link

atv2016 commented Apr 15, 2016

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

@seagullbird
Copy link
Author

Thanks a loooooot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants