Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ErikTronic

macrumors newbie
Original poster
Hi

Im trying to compile the program waon 0.9 on my macbook. Ive installed the needed packages: fftw3 and libsndfile. Ive also installed pkg-config and the packages .pc files are located here: /usr/local/lib/pkgconfig

I use this make file to compile:

Code:
# Makefile for waon
# Copyright (C) 1998-2007 Kengo Ichiki 
# $Id: Makefile.waon,v 1.7 2007/11/04 23:59:41 kichiki Exp $
 
 
CC = gcc
 
# with FFTW3
CFLAGS = \
	-Wall -march=core2 -O3 -ffast-math \
	`pkg-config --cflags fftw3` \
	`pkg-config --cflags sndfile`
LDFLAGS= \
	-L/usr/local/lib/pkgconfig \
	`pkg-config --libs fftw3` \
	`pkg-config --libs sndfile` \
	-lm
 
# with FFTW2
#CFLAGS = \
#	-Wall -march=pentium -O3 -ffast-math \
#	-I/usr/local/include -DFFTW2
#LDFLAGS= \
#	-L/usr/local/lib \
#	-lfftw -lrfftw \
#	-lsndfile \
#	-lm
 
OBJS =	\
	main.o \
	notes.o \
	midi.o \
	analyse.o \
	fft.o \
	hc.o \
	snd.o
 
waon: $(OBJS)
	$(CC) $(CFLAGS) -o waon $(OBJS) $(LDFLAGS)
 
clean: 
	rm -f *.o *~ waon *.core

And executes it with this statement: make -f Makefile.waon
Witch gives me this error message:


Code:
cc  -o waon main.o notes.o midi.o analyse.o fft.o hc.o snd.o  -L/usr/local/lib `pkg-config --libs fftw3` `pkg-config --libs sndfile` -lm
Package fftw3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `fftw3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'fftw3' found
Package sndfile was not found in the pkg-config search path.
Perhaps you should add the directory containing `sndfile.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sndfile' found
Undefined symbols:
  "_sf_writef_double", referenced from:
      _sndfile_write in snd.o
      _sndfile_write in snd.o
  "_sf_open", referenced from:
      _main in main.o
      _init_patch in analyse.o
      _sndfile_open_for_write in snd.o
  "_fftw_execute", referenced from:
      _main in main.o
      _power_spectrum_fftw in fft.o
      _apply_FFT in fft.o
  "_fftw_plan_r2r_1d", referenced from:
      _main in main.o
      _init_patch in analyse.o
  "_fftw_destroy_plan", referenced from:
      _main in main.o
      _init_patch in analyse.o
  "_sf_seek", referenced from:
      _sndfile_read_at in snd.o
  "_sf_close", referenced from:
      _main in main.o
      _init_patch in analyse.o
  "_fftw_malloc", referenced from:
      _main in main.o
      _main in main.o
  "_sf_readf_double", referenced from:
      _sndfile_read in snd.o
      _sndfile_read in snd.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [waon] Error 1

Is there antone who can help me compile this program?

Thanks
/Erik
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.