[PD] trouble compiling pd
IOhannes m zmoelnig
zmoelnig at iem.at
Wed Sep 5 15:01:04 CEST 2007
eric labelle wrote:
> hi Iohannes
>
> Here are the last few lines it outputs when the make fails:
>
> -I../portmidi/pm_linux -fno-strict-aliasing -DPA_USE_ALSA
> -DUSEAPI_ALSA -O6 -funroll-loops -fomit-frame-pointer
> -D_LARGEFILE64_SOURCE -DINSTALL_PREFIX=\"/usr/local\" -c -o
> ../obj/x_misc.o x_misc.c
> x_misc.c: In function 'cputime_bang2':
> x_misc.c:233: error: 'HZ' undeclared (first use in this function)
> x_misc.c:233: error: (Each undeclared identifier is reported only once
> x_misc.c:233: error: for each function it appears in.)
> make: *** [x_misc.o] Error 1
>
weird. it seems like there is some mysterious preprocessor magic going on...
are you trying to compile vanilla pd or a special version of pd?
what is the exact compiler command that gets called to compile x_misc.c?
(in your code snippet the 1st part is missing; it should start with "cc"
or "gcc")
try running the preprocessor on the x_misc.c and send us the output [1]
mfa.sdr
IOhannes
[1] on my machine the call to the compiler looks like:
cc -g -O2 -DPD -Wall -W -Wstrict-prototypes -Wno-unused
-Wno-parentheses -Wno-switch -DDL_OPEN -DPA_USE_OSS -DUNIX -DUNISTD
-DUSEAPI_OSS -I../portaudio/pa_common
-I../portaudio/pablio -I../portmidi/pm_common
-I../portmidi/pm_linux -fno-strict-aliasing -DPA_USE_ALSA
-DUSEAPI_ALSA -D_LARGEFILE64_SOURCE -DINSTALL_PREFIX=\"/usr/local\" -c
-o ../obj/x_misc.o x_misc.c
so i call the preprocessor with:
cpp -g -O2 -DPD -Wall -W -Wstrict-prototypes -Wno-unused
-Wno-parentheses -Wno-switch -DDL_OPEN -DPA_USE_OSS -DUNIX -DUNISTD
-DUSEAPI_OSS -I../portaudio/pa_common
-I../portaudio/pablio -I../portmidi/pm_common
-I../portmidi/pm_linux -fno-strict-aliasing -DPA_USE_ALSA
-DUSEAPI_ALSA -D_LARGEFILE64_SOURCE -DINSTALL_PREFIX=\"/usr/local\" -o
x_misc.m x_misc.c
(in short: replace "cc" with "cpp" and "../obj/x_misc.o" with "x_misc.m"
and remove the "-c" flag;
the interesting output is now in x_misc.m)
you can run these commands from the cmdline in pd/src/
More information about the Pd-list
mailing list