This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

strange g++ -D behavior,


Hi,

	This may be a FAQ - if so apologies; I seem to be getting -DFoo
substitution in some include paths.

	I have a plain gcc-3.2.2 build, on prefix:

		/home/michael/ximian-desktop/ooo/BUILD/ooo/

	I build OpenOffice.org in a sub-prefix - which goes fine building C
programs, but when I hit the first c++ program, I get a most curious
error:

[snip]
from
/home/michael/ximian-desktop/ooo/BUILD/ooo/OOO_1_0_2/xml2cmp/source/xcd/main.cxx:62:
/home/michael/ximian-desktop/ooo/BUILD/ooo/OOO_1_0_2/solver/641/unxlngi4.pro/inc/stl/cstddef:35:46:
/home/michael/ximian-desktop/ooo/7663/ooo/include/c++/3.2.2/cstddef: No
                               **^^^^**
such file or directory
[snip]

	The issue being that the first path is correct - cstddef is there;
however - the 2nd path has a 's/BUILD/7663/' substitution done on it -
for reasons unexplained.

	Creating a symlink from 'BUILD' -> '7663' results in a clean build. The
final fishy smell is that one of the pre-processor options is
'-DBUILD=7663' - which makes me suspicious of an ignorance problem on my
part, or an overly enthusiastic substitution problem somewhere inside
c++.

	Fuller compiler output:
		http://primates.ximian.com/~michael/gcc-build-err.txt

	Grokking the pre-processing output (using -E) reveals that the paths
are correct coming out of the pre-processor; and it seems that this is
an issue isolated to c++ - could I be falling over a subtle feature ?

	Help appreciated,

	Thanks,

		Michael.

-- 
 mmeeks at gnu dot org  <><, Pseudo Engineer, itinerant idiot


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]