[aspectc-user] weaving problem

MeunS Meunier sylvainmeunier26 at hotmail.com
Mon Jun 20 15:00:17 CEST 2005


Hello,

I don't succeed to weave my small test project.

The sources :

////////////////////////////////// it.h
#ifndef __IT
#define __IT

class It
{
public:
	It() : age(5){};

	void setAge(int age)
	{
		It::age = age;
	}

	int getAge()
	{
		return age;
	}

	void happyBirthday()
	{
		age++;
	}

private:
	int age;
};

#endif
///////////////////////////////////// contract.ah
#ifndef __CONTRACT
#define __CONTRACT

#include "./it.h"
#include <iostream>

aspect Contract
{
public:
	advice execution("% It::happyBirthday(...)") && that(it) : after(It& it)
	{
		std::cout << "contract" << std::endl;
	}
};

#endif
/////////////////////////////////////////////// main.cc
#include "./it.h"

int main()
{
	It it;
	it.setAge(2);
	it.happyBirthday();
}

(g++ 3.4.3, ac++ 0.9.3)

I use this command to weave my project :
ac++ -c main.cc -o main.acc -a contract.ah -p. -I/usr/include/c++/3.3.4

But ac++ return this error message :

/usr/include/c++/3.3.4/iostream:45: error: bits/c++config.h: No such file or 
directory
/usr/include/c++/3.3.4/iosfwd:46: error: bits/c++config.h: No such file or 
directory
/usr/include/c++/3.3.4/iosfwd:47: error: bits/c++locale.h: No such file or 
directory
/usr/include/c++/3.3.4/cctype:49: error: bits/c++config.h: No such file or 
directory
/usr/include/c++/3.3.4/cctype:51: error: ctype.h: No such file or directory
/usr/include/c++/3.3.4/bits/stringfwd.h:46: error: bits/c++config.h: No such 
file or directory
/usr/include/c++/3.3.4/bits/fpos.h:45: error: bits/c++io.h: No such file or 
directory
/usr/include/c++/3.3.4/cwchar:50: error: bits/c++config.h: No such file or 
directory
/usr/include/c++/3.3.4/cstddef:50: error: stddef.h: No such file or 
directory
/usr/include/c++/3.3.4/ctime:53: error: time.h: No such file or directory
/usr/include/c++/3.3.4/cstring:53: error: string.h: No such file or 
directory
/usr/include/c++/3.3.4/cstdio:50: error: bits/c++config.h: No such file or 
directory
/usr/include/c++/3.3.4/cstdio:54: error: stdio.h: No such file or directory
/usr/include/c++/3.3.4/bits/localefwd.h:46: error: bits/c++config.h: No such 
file or directory
/usr/include/c++/3.3.4/bits/localefwd.h:47: error: bits/c++locale.h: No such 
file or directory
/usr/include/c++/3.3.4/bits/ios_base.h:46: error: bits/atomicity.h: No such 
file or directory
/usr/include/c++/3.3.4/string:46: error: bits/c++config.h: No such file or 
directory
/usr/include/c++/3.3.4/bits/stl_algobase.h:65: error: bits/c++config.h: No 
such file or directory
/usr/include/c++/3.3.4/climits:51: error: limits.h: No such file or 
directory
/usr/include/c++/3.3.4/cstdlib:50: error: bits/c++config.h: No such file or 
directory
/usr/include/c++/3.3.4/cstdlib:54: error: stdlib.h: No such file or 
directory
/usr/include/c++/3.3.4/bits/type_traits.h:56: error: bits/c++config.h: No 
such file or directory
/usr/include/c++/3.3.4/bits/concept_check.h:42: error: bits/c++config.h: No 
such file or directory
/usr/include/c++/3.3.4/bits/stl_threads.h:54: error: bits/gthr.h: No such 
file or directory
/usr/include/c++/3.3.4/bits/stl_threads.h:79: error, __GTHREAD_MUTEX_INIT or 
__GTHREAD_MUTEX_INIT_FUNCTION should be defined by gthr.h abstraction layer, 
report problem to libstdc++ at gcc.gnu.org.
/usr/include/c++/3.3.4/cctype:68: error: `isalnum' is not a member of `::'
/usr/include/c++/3.3.4/cctype:69: error: `isalpha' is not a member of `::'
/usr/include/c++/3.3.4/cctype:70: error: `iscntrl' is not a member of `::'
/usr/include/c++/3.3.4/cctype:71: error: `isdigit' is not a member of `::'
/usr/include/c++/3.3.4/cctype:72: error: `isgraph' is not a member of `::'
/usr/include/c++/3.3.4/cctype:73: error: `islower' is not a member of `::'
/usr/include/c++/3.3.4/cctype:74: error: `isprint' is not a member of `::'
/usr/include/c++/3.3.4/cctype:75: error: `ispunct' is not a member of `::'
/usr/include/c++/3.3.4/cctype:76: error: `isspace' is not a member of `::'
/usr/include/c++/3.3.4/cctype:77: error: `isupper' is not a member of `::'
/usr/include/c++/3.3.4/cctype:78: error: `isxdigit' is not a member of `::'
/usr/include/c++/3.3.4/cctype:79: error: `tolower' is not a member of `::'
/usr/include/c++/3.3.4/cctype:80: error: `toupper' is not a member of `::'
/usr/include/c++/3.3.4/cstddef:52: error: `ptrdiff_t' is not a member of 
`::'
/usr/include/c++/3.3.4/cstddef:53: error: `size_t' is not a member of `::'
/usr/include/c++/3.3.4/ctime:66: error: `clock_t' is not a member of `::'
/usr/include/c++/3.3.4/ctime:67: error: `time_t' is not a member of `::'
/usr/include/c++/3.3.4/ctime:68: error: `tm' is not a member of `::'
/usr/include/c++/3.3.4/ctime:70: error: `clock' is not a member of `::'
/usr/include/c++/3.3.4/ctime:71: error: `difftime' is not a member of `::'
/usr/include/c++/3.3.4/ctime:72: error: `mktime' is not a member of `::'
/usr/include/c++/3.3.4/ctime:73: error: `time' is not a member of `::'
/usr/include/c++/3.3.4/ctime:74: error: `asctime' is not a member of `::'
/usr/include/c++/3.3.4/ctime:75: error: `ctime' is not a member of `::'
/usr/include/c++/3.3.4/ctime:76: error: `gmtime' is not a member of `::'
/usr/include/c++/3.3.4/ctime:77: error: `localtime' is not a member of `::'
/usr/include/c++/3.3.4/ctime:78: error: `strftime' is not a member of `::'
/usr/include/c++/3.3.4/bits/fpos.h:63: error: invalid member declaration 
near token `_M_off'
/usr/include/c++/3.3.4/exception:82: error: invalid declaration near token 
`__attribute__'
/usr/include/c++/3.3.4/exception:88: error: invalid declaration near token 
`__attribute__'
/usr/include/c++/3.3.4/cstring:79: error: `memcpy' is not a member of `::'
/usr/include/c++/3.3.4/cstring:80: error: `memmove' is not a member of `::'
/usr/include/c++/3.3.4/cstring:81: error: `strcpy' is not a member of `::'
/usr/include/c++/3.3.4/cstring:82: error: `strncpy' is not a member of `::'
/usr/include/c++/3.3.4/cstring:83: error: `strcat' is not a member of `::'
/usr/include/c++/3.3.4/cstring:84: error: `strncat' is not a member of `::'
/usr/include/c++/3.3.4/cstring:85: error: `memcmp' is not a member of `::'
/usr/include/c++/3.3.4/cstring:86: error: `strcmp' is not a member of `::'
/usr/include/c++/3.3.4/cstring:87: error: `strcoll' is not a member of `::'
/usr/include/c++/3.3.4/cstring:88: error: `strncmp' is not a member of `::'
/usr/include/c++/3.3.4/cstring:89: error: `strxfrm' is not a member of `::'
/usr/include/c++/3.3.4/cstring:90: error: `strcspn' is not a member of `::'
/usr/include/c++/3.3.4/cstring:91: error: `strspn' is not a member of `::'
/usr/include/c++/3.3.4/cstring:92: error: `strtok' is not a member of `::'
/usr/include/c++/3.3.4/cstring:93: error: `memset' is not a member of `::'
/usr/include/c++/3.3.4/cstring:94: error: `strerror' is not a member of `::'
/usr/include/c++/3.3.4/cstring:95: error: `strlen' is not a member of `::'
/usr/include/c++/3.3.4/cstring:97: error: `memchr' is not a member of `::'
/usr/include/c++/3.3.4/cstring:100: error: invalid declaration near token 
`size_t'
/usr/include/c++/3.3.4/cstring:109: error: `strpbrk' is not a member of `::'
/usr/include/c++/3.3.4/cstring:115: error: `strrchr' is not a member of `::'
/usr/include/c++/3.3.4/cstring:121: error: `strstr' is not a member of `::'
/usr/include/c++/3.3.4/bits/char_traits.h:68: error: invalid member 
declaration near token `off_type'
/usr/include/c++/3.3.4/bits/char_traits.h:122: error: invalid member 
declaration near token `off_type'
/usr/include/c++/3.3.4/cstdio:99: error: `FILE' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:100: error: `fpos_t' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:102: error: `clearerr' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:103: error: `fclose' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:104: error: `feof' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:105: error: `ferror' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:106: error: `fflush' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:107: error: `fgetc' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:108: error: `fgetpos' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:109: error: `fgets' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:110: error: `fopen' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:111: error: `fprintf' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:112: error: `fputc' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:113: error: `fputs' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:114: error: `fread' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:115: error: `freopen' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:116: error: `fscanf' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:117: error: `fseek' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:118: error: `fsetpos' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:119: error: `ftell' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:120: error: `fwrite' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:121: error: `getc' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:122: error: `getchar' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:123: error: `gets' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:124: error: `perror' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:125: error: `printf' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:126: error: `putc' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:127: error: `putchar' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:128: error: `puts' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:129: error: `remove' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:130: error: `rename' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:131: error: `rewind' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:132: error: `scanf' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:133: error: `setbuf' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:134: error: `setvbuf' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:135: error: `sprintf' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:136: error: `sscanf' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:137: error: `tmpfile' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:138: error: `tmpnam' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:139: error: `ungetc' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:140: error: `vfprintf' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:141: error: `vprintf' is not a member of `::'
/usr/include/c++/3.3.4/cstdio:142: error: `vsprintf' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:86: error: `div_t' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:87: error: `ldiv_t' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:89: error: `abort' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:90: error: `abs' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:91: error: `atexit' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:92: error: `atof' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:93: error: `atoi' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:94: error: `atol' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:95: error: `bsearch' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:96: error: `calloc' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:97: error: `div' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:98: error: `exit' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:99: error: `free' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:100: error: `getenv' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:101: error: `labs' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:102: error: `ldiv' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:103: error: `malloc' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:104: error: `mblen' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:105: error: `mbstowcs' is not a member of 
`::'
/usr/include/c++/3.3.4/cstdlib:106: error: `mbtowc' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:107: error: `qsort' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:108: error: `rand' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:109: error: `realloc' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:110: error: `srand' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:111: error: `strtod' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:112: error: `strtol' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:113: error: `strtoul' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:114: error: `system' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:115: error: `wcstombs' is not a member of 
`::'
/usr/include/c++/3.3.4/cstdlib:116: error: `wctomb' is not a member of `::'
/usr/include/c++/3.3.4/cstdlib:121: error: invalid declaration near token 
`inline'
/usr/include/c++/3.3.4/new:82: error: `operator new' already defined
<anonymous unit>:36: previously defined here
/usr/include/c++/3.3.4/new:83: error: `operator new[]' already defined
/usr/include/c++/3.3.4/new:86: error: `operator new' already defined
/usr/include/c++/3.3.4/new:87: error: `operator new[]' already defined
/usr/include/c++/3.3.4/new:92: error: invalid declaration near token `std'
/usr/include/c++/3.3.4/bits/stl_iterator_base_types.h:102: error: invalid 
declaration near token `template'
/usr/include/c++/3.3.4/bits/stl_iterator_base_types.h:137: error: invalid 
member declaration near token `difference_type'
/usr/include/c++/3.3.4/bits/stl_iterator_base_types.h:146: error: invalid 
member declaration near token `difference_type'
/usr/include/c++/3.3.4/bits/stl_iterator.h:89: error: invalid declaration 
near token `template'
/usr/include/c++/3.3.4/bits/stl_iterator.h:272: error: invalid declaration 
near token `template'
/usr/include/c++/3.3.4/bits/stl_iterator.h:389: error: invalid declaration 
near token `template'
/usr/include/c++/3.3.4/bits/stl_iterator.h:460: error: invalid declaration 
near token `template'
/usr/include/c++/3.3.4/bits/stl_iterator.h:553: error: invalid declaration 
near token `template'
/usr/include/c++/3.3.4/bits/stl_iterator.h:572: error: `iterator' is not a 
member of `std'
/usr/include/c++/3.3.4/bits/stl_iterator.h:573: error: invalid declaration 
near token `template'
/usr/include/c++/3.3.4/bits/stl_threads.h:63: error: invalid member 
declaration near token `_RC_t'
/usr/include/c++/3.3.4/bits/stl_threads.h:54: error: `std' already defined
/usr/include/c++/3.3.4/bits/functexcept.h:36: previously defined here


Where is the error ?

thanks

Sylvain Meunier

PS : sorry for my very bad english :'(

_________________________________________________________________
MSN Hotmail : choisissez votre adresse @hotmail.fr 
http://www.imagine-msn.com/hotmail/default.aspx?locale=fr-FR




More information about the aspectc-user mailing list