[aspectc-user] include bug

Olaf Spinczyk os at aspectc.org
Wed May 13 16:28:40 CEST 2009


Hi!

To me this looks like a problem related to a case-insensitive 
filesystem. With "-Iexample/src/primitives/" ag++ looks for header files 
in your project directory tree first. If it looks for "string.h" and if 
there is a "String.h" in example... and if your are using a 
case-insensitive filesystem it is no surprise that ag++ opens the wrong 
file.

Best regards,

Olaf


steven wrote:
> hello,
>
> our project contains a header file "String.h".
> Our class "Array" incudes "cstring" from std includes of gcc, which in 
> turn has an #include <string.h>.
> it seems that ag++ includes our string class instead of the std string 
> class. which leads to the error
> message shown below. ag++ seems to ignore the case, too.
> we renamed our string class and it works. but, we do not want to 
> change our code according to ag++
> internals :)
> how can this be fixed? .. how can ag++ be configured not to use our 
> class definitions when resolving std
> includes? is this intended?
>
>
> ag++ -Wno-endif-labels -O3 -k -v1 --config example/puma.config  -c 
> example/src/primitives/Array.cpp -o example/src/primitives/Array.o
> *
> *
> * AG++ Configuration:
> *   Create puma.config: 0
> *   Aspect C++ weaver:  ac++
> *   C++ compiler:       g++
> *   Files:               example/src/primitives/Array.cpp
> *   Options (G++):       -Wno-endif-labels -O3 -c 
> -I"example/src/primitives/"
> *   Options (AC++):      -k -v1 -p.
> *   Options (total):     -Wno-endif-labels -O3 -k -v1 -c 
> example/src/primitives/Array.cpp -I"example/src/primitives/" -p.
> *   Weave: 1 Compile: 1 Link: 0
> *
> *
> * Weaving
> * Running ac++ 1.0pre3
> * Handling Translation Unit `Array.cpp'.
> * Inserting unit pro- and epilogues
> * Updating #line directives of generated code fragments
> * Saving
> * Done
> * Compiling
> In file included from 
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:52, 
>
>                  from 
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/bits/char_traits.h:45, 
>
>                  from 
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/string:47, 
>
>                  from 
> example/src/primitives/../primitivesCore/../misc/defs.h:32:
> example/src/primitives/string.h:38: error: expected class-name before 
> '{' token
> example/src/primitives/string.h:41: error: 'pVMObject' has not been 
> declared
> example/src/primitives/string.h:41: error: 'pVMFrame' has not been 
> declared
> example/src/primitives/string.h:42: error: 'pVMObject' has not been 
> declared
> example/src/primitives/string.h:42: error: 'pVMFrame' has not been 
> declared
> example/src/primitives/string.h:43: error: 'pVMObject' has not been 
> declared
> example/src/primitives/string.h:43: error: 'pVMFrame' has not been 
> declared
> example/src/primitives/string.h:44: error: 'pVMObject' has not been 
> declared
> example/src/primitives/string.h:44: error: 'pVMFrame' has not been 
> declared
> example/src/primitives/string.h:45: error: 'pVMObject' has not been 
> declared
> example/src/primitives/string.h:45: error: 'pVMFrame' has not been 
> declared
> example/src/primitives/string.h:46: error: 'pVMObject' has not been 
> declared
> example/src/primitives/string.h:46: error: 'pVMFrame' has not been 
> declared
> In file included from 
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/bits/char_traits.h:45, 
>
>                  from 
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/string:47, 
>
>                  from 
> example/src/primitives/../primitivesCore/../misc/defs.h:32:
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:80: 
> error: '::memcpy' has not been declared
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:81: 
> error: '::memmove' has not been declared
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:82: 
> error: '::strcpy' has not been declared
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:83: 
> error: '::strncpy' has not been declared
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:84: 
> error: '::strcat' has not been declared
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:85: 
> error: '::strncat' has not been declared
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:86: 
> error: '::memcmp' has not been declared
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:87: 
> error: '::strcmp' has not been declared
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:88: 
> error: '::strcoll' has not been declared
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:89: 
> error: '::strncmp' has not been declared
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:90: 
> error: '::strxfrm' has not been declared
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:91: 
> error: '::strcspn' has not been declared
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:92: 
> error: '::strspn' has not been declared
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:93: 
> error: '::strtok' has not been declared
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:94: 
> error: '::memset' has not been declared
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:95: 
> error: '::strerror' has not been declared
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:96: 
> error: '::strlen' has not been declared
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:98: 
> error: '::memchr' has not been declared
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring: 
> In function 'void* std::memchr(void*, int, size_t)':
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:102: 
> error: invalid conversion from 'const void*' to 'void*'
> /sw/lib/gcc4.2/lib/gcc/i686-apple-darwin9/4.2.2/../../../../include/c++/4.2.2/cstring:102: 
> error:   initializing argument 1 of 'void* std::memchr(void*, int, 
> size_t)'
> ... and many more
>
> regards,
>
> steven
>
>
> _______________________________________________
> aspectc-user mailing list
> aspectc-user at aspectc.org
> http://www.aspectc.org/mailman/listinfo/aspectc-user
>




More information about the aspectc-user mailing list