Re: problem in gcc (lib) headers __BEGIN_DECLS & traceback-incomplete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonathan Wakely wrote:
Reduce your code to the minimum necessary to show the problem, and
paste that here. If as you say, there is nothing before the includes,
you shouldn't need to paste any of your code, just two files
containing nothing but include directives. We can't reliably guess
what your code does.

Why am I getting this error, and how did I get to 'assert.h' (where
there is a __BEGIN_CDECLS?

My guess is that either the installation of your C library headers is
messed up, or you have a header with the same name as a standard C
header, or you have a header with the same include guard as a standard
C header.
----
	Hmmm...This is weird:
--src.c--
#include "src.h"
---------
--src.h--
#include <ctype.h>
#include "fieldmetergraph.h"
---------

/usr/bin/g++ -Og -g3 -ggdb -m64 -march=native -fpic -pipe -std=c++11 -ftabstop=2 -g -DHAVE_CONFIG_H -Wp,-MD,.src.o.d -I/usr/include/freetype2 -I/home/tools/xosview/xosview-1.90/src -I/home/tools/xosview/xosview-1.90/src/linux -c src.cc -o src.o
In file included from /usr/include/features.h:378:0,
                from /usr/include/ctype.h:25,
                from src.h:1,
                from src.cc:1:
/usr/include/assert.h:64:1: error: expected unqualified-id before string constant
__BEGIN_DECLS
^
-----

Whittled it down to the above, where if I delete the first
local include, the problem goes away, so I should whittle that
down.  But why would I be shown a supposed error *before*
that 2nd include (to fieldmetergraph.h)?

That's related to part of my problem in that the error isn't pointing to the right place for me to track it back.

Will look at fmg.h -- but hopefully it won't be chasing
into another nested include that goes unlisted in the error
message...



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux