mex -g -v ppmex.c
ppmex.c: In function ‘getBit’:
ppmex.c:75:13: error: ‘true’ undeclared (first use in this function)
return (true && (b & 1<<n)); /* need a bona fide bool */
^
ppmex.c:75:13: note: each undeclared identifier is reported only once for each function it appears in
ppmex.c: In function ‘printBits’:
ppmex.c:81:9: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
printf("%c",getBit(b,i) ? '1' : '0');
^
ppmex.c: In function ‘ppd’:
ppmex.c:95:9: warning: incompatible implicit declaration of built-in function ‘printf’ [enabled by default]
printf("PPD ioctl %d: %d (%s)\n",action,result,strerror(errno));
^
ppmex.c: At top level:
ppmex.c:100:1: error: unknown type name ‘uint64_t’
void read(const uint64_T reg, void * const b, const int parportfd, const int reader, const int o) {
^
ppmex.c: In function ‘read’:
ppmex.c:53:19: error: expected ‘(’ before ‘false’
#define USE_PPDEV false /* just sketched in atm */
^
ppmex.c:101:8: note: in expansion of macro ‘USE_PPDEV’
if USE_PPDEV {
^
ppmex.c:53:19: error: ‘false’ undeclared (first use in this function)
#define USE_PPDEV false /* just sketched in atm */
^
ppmex.c:101:8: note: in expansion of macro ‘USE_PPDEV’
if USE_PPDEV {
^
ppmex.c: At top level:
ppmex.c:115:9: error: unknown type name ‘uint8_t’
const uint8_T * const data,
^
ppmex.c: In function ‘doPort’:
ppmex.c:119:25: error: ‘false’ undeclared (first use in this function)
static bool setup = false;
^
In file included from ppmex.c:30:0:
/usr/include/octave-3.8.1/octave/mex.h:112:18: error: unknown type name ‘uint64_t’
#define uint64_T uint64_t
^
ppmex.c:121:5: note: in expansion of macro ‘uint64_T’
uint64_T reg;
^
ppmex.c:53:19: error: expected ‘(’ before ‘false’
#define USE_PPDEV false /* just sketched in atm */
^
ppmex.c:125:8: note: in expansion of macro ‘USE_PPDEV’
if USE_PPDEV {
^
In file included from ppmex.c:30:0:
ppmex.c: In function ‘mexFunction’:
/usr/include/octave-3.8.1/octave/mex.h:112:18: error: unknown type name ‘uint64_t’
#define uint64_T uint64_t
^
ppmex.c:265:5: note: in expansion of macro ‘uint64_T’
uint64_T *addresses;
^
/usr/include/octave-3.8.1/octave/mex.h:160:17: error: unknown type name ‘uint8_t’
#define uint8_T uint8_t
^
ppmex.c:266:5: note: in expansion of macro ‘uint8_T’
uint8_T *data;
^
/usr/include/octave-3.8.1/octave/mex.h:112:18: error: unknown type name ‘uint64_t’
#define uint64_T uint64_t
^
ppmex.c:269:5: note: in expansion of macro ‘uint64_T’
uint64_T address, port;
^
/usr/include/octave-3.8.1/octave/mex.h:160:17: error: unknown type name ‘uint8_t’
#define uint8_T uint8_t
^
ppmex.c:270:5: note: in expansion of macro ‘uint8_T’
uint8_T bitNum, regOffset, value = 0;
^
ppmex.c:305:23: error: ‘false’ undeclared (first use in this function)
writing = false;
^
ppmex.c:308:23: error: ‘true’ undeclared (first use in this function)
writing = true;
^
ppmex.c:51:15: error: expected ‘(’ before ‘true’
#define DEBUG true
^
ppmex.c:315:8: note: in expansion of macro ‘DEBUG’
if DEBUG printf("%d lhs\n",nlhs);
^
ppmex.c:51:15: error: expected ‘(’ before ‘true’
#define DEBUG true
^
ppmex.c:335:8: note: in expansion of macro ‘DEBUG’
if DEBUG printf("\n\ndata:\n");
^
ppmex.c:51:15: error: expected ‘(’ before ‘true’
#define DEBUG true
^
ppmex.c:344:12: note: in expansion of macro ‘DEBUG’
if DEBUG {
^
ppmex.c:51:15: error: expected ‘(’ before ‘true’
#define DEBUG true
^
ppmex.c:359:8: note: in expansion of macro ‘DEBUG’
if DEBUG {
^
g++: error: ppmex.o: No such file or directory
gcc -c -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-3.8.1/octave/.. -I/usr/include/octave-3.8.1/octave -g -O2 -fstack-protector--param=ssp-buffer-size=4 -Wformat -Werror=format-security -pthread -fopenmp -g -I. ppmex.c -o ppmex.o
g++ -shared -Wl,-Bsymbolic -o ppmex.mex ppmex.o -L/usr/lib/x86_64-linux-gnu/octave/3.8.1 -L/usr/lib/x86_64-linux-gnu -loctinterp -loctave -Wl,-Bsymbolic-functions -Wl,-z,relro
--
Assistant Professor
Department of Psychology
Florida State University
1107 W. Call St.
Tallahassee, FL 32306-4301