When compiling foo.c using ‘qcc’ and linking against the static libham
library, I get no errors and the executable is build without problems.
However when I use the ‘QCC’ compile command on a foo.cc file and link
against the static libham library, I get errors:
bash# QCC -o foo foo.cc -lham
In file included from foo.cc:7:
/usr/include/ha/ham.h:175: declaration of `operator ’ as non-function
/usr/include/ha/ham.h:175: confused by earlier errors, bailing out
cc: /usr/lib/gcc-lib/ntox86/2.95.3/cc1plus error 34
foo.c/foo.cc is a very simple file that looks like this:
#include <stdio.h> #include <ha/ham.h>
int main(int argc, char* argv[])
{
return 0;
}
Don’t quite understand why? Am I missing something?
Probably your library is written in C, and misses
extern “C” for function prototypes in headers.
Eduard
When compiling foo.c using ‘qcc’ and linking against the static libham
library, I get no errors and the executable is build without problems.
However when I use the ‘QCC’ compile command on a foo.cc file and link
against the static libham library, I get errors:
bash# QCC -o foo foo.cc -lham
In file included from foo.cc:7:
/usr/include/ha/ham.h:175: declaration of `operator ’ as non-function
/usr/include/ha/ham.h:175: confused by earlier errors, bailing out
cc: /usr/lib/gcc-lib/ntox86/2.95.3/cc1plus error 34
foo.c/foo.cc is a very simple file that looks like this:
#include <stdio.h #include <ha/ham.h
int main(int argc, char* argv[])
{
return 0;
}
Don’t quite understand why? Am I missing something?