[aspectc-user] Problems with getting aspectC to work.

Olaf Spinczyk Olaf.Spinczyk at informatik.uni-erlangen.de
Wed Jan 26 17:33:11 CET 2005


Hi Shishir,

Shishir Ramam wrote:
> Hi, 
> 
> I need help getting AcpectC++ to work on the following setup - 
>  WinXpP + Mingw + Eclipse + ACDT + examples/Action code. 
> Can't seem to get the simple examples compiled. The details
> of the steps I have followed thus far - 
> 
> - Installed Eclipse, mingw and ACDT
> - set PATH= Path2aspectC;Path2Mingw\bin;%PATH%
>    (Note these are ahead of the default path)
> - Started a new c++ project in Eclipse.
> - Imported file system from aspectC/examples/Action
> - On attempting to build, had some problems with the include paths
>   from within eclipse. Incrementally, added directories to the include
>   path in the project, to this effect - 
> 
> 1. Default Eclipse project.
> 
>>ac++  -r repo.acp -p .. -o main.acc -c ../main.cc
> 
> ../main.cc:3: error: No include path in which to find `stdio.h'
> 
> 2. Added -IMingwPath/include
> 
>>ac++  -r repo.acp -p .. -o main.acc -c ../main.cc -IMingwPath/include
> 
> MingwPath/include/stddef.h:7: error: No include path in which to find `stddef.h'
> MingwPath/include/stdarg.h:7: error: No include path in which to find `stdarg.h'
> MingwPath/include/stdio.h:176: error: invalid declaration near token `FILE'
> MingwPath/include/stdio.h:191: error: invalid declaration near token `FILE'
> 
> 3. Added -IMingwPath/lib/gcc-lib/mingw32/3.2.3/include -IMingwPath/include
> 
>>ac++  -r repo.acp -p .. -o main.acc -c ../main.cc \
> 
> -IMingwPath/lib/gcc-lib/mingw32/3.2.3/include -IMingwPath/include
> MingwPath/lib/gcc-lib/mingw32/3.2.3/include/stddef.h:327: \
> 	error: invalid type specified in declaration
> MingwPath/lib/gcc-lib/mingw32/3.2.3/include/stdarg.h:44: error: \
> 	invalid declaration near token `__gnuc_va_list'
> MingwPath/include/stdio.h:176: error: invalid declaration near token `FILE'
> MingwPath/include/stdio.h:191: error: invalid declaration near token `FILE'
> 
> 
> - To ensure that mingw was setup correctly, I attempted a 
>    gcc ../main.cc from the Eclipse/workspace/Test/debug. 
>    This worked fine and generated an a.exe which ran as expected. 
> 
> - Not sure where to go from here.
> - Oh, and 'cat puma.config' =
>    -----------------------------------
>    --skip-bodies-non-prj
>    -D __puma
>    -D __STDC__
>   ------------------------------------
> 
> Any help getting this sorted out is much appreciated.
> 
> -shishir

I'm sure that your puma.config file causes the trouble. Normally, it 
coutains many more -D lines and several -I lines, which describe the 
include file search paths of your compiler. With the right config file 
you don't have to add all the include paths by hand. The missing -Ds are 
responsible for the parse errors.

Could you send me the output of "g++ -E -dM -v -x c++ /dev/null" (or 
"g++ -E -dM -v an_empty_file.cpp" if /dev/null doesn't work with mingw) 
and the command line, which you used to generate the puma.config file, 
please?

Olaf

PS: As a workaround you could switch to the cygwin g++ compiler. This 
definitely works.




More information about the aspectc-user mailing list