I've been stumped over this one:
SpanLogger_c.h
#ifndef SPANLOGGERCH #define SPANLOGGERCH struct CSpan { int64_t trace_id; }; #endif
main.c
#include "SpanLogger_c.h" int main(int argc, char * const argv[]) { struct CSpan span; }
compilation command:
g++ -g -I. main.c
I get this error
main.c: In function ‘int main(int, char* const*)’: main.c:7: error: aggregate ‘CSpan span’ has incomplete type and cannot be defined
Anybody help?
.c
file with a C++ compiler? – jwodderg++
is for C++ programs;gcc
is for C programs. – M.M