build errors with ansi c89

Issue #50 resolved
Mario Bambagini created an issue

Hi,

two errors are generated when building the code for ansi c89

without the std option, the build succeeds

build command

gcc main.c -o main -Iinclude -lpapi -Llib -std=c89

build error

gcc main.c -o main -I include -lpapi -Llib -std=c89 In file included from main.c:3:0: include/papi.h:436:3: error: C++ style comments are not allowed in ISO C90 //#define PAPI_EDGE_DETECT 9 /*< Count cycles of events if supported [not implemented] / ^

in file included from main.c:3:0: include/papi.h:1067:50: error: unknown type name ‘caddr_t’ int PAPI_profil(void *buf, unsigned bufsiz, caddr_t offset,

Comments (6)

  1. Vince Weaver

    is there a reason you need to build with -std=c89? What architecture are you trying to build on?

  2. Mario Bambagini reporter

    the architecture is a standard x86_64. the code I'm building must be compliant with ansi c89

  3. Log in to comment