[aspectc-user] __declspec issues

John Hawkins HAWKINSJ at uk.ibm.com
Wed Aug 18 18:41:25 CEST 2004




That's great thankyou
Got another issue now :-(

    virtual void setUserName(string& m_sUserName)=0;

When this line is parsed I get

c:/DOCUME~1/administrator/mydocu~1/projects/cwss/code/build/ws-axis/c/src/../inc
lude/axis/server/IMessageData.h:86: error: invalid member declaration near
token
 `string'
  - Aborting

I assume that this means that "string" cannot be found (when I make it
char* there are no issues) . Correct?If so, then I'm not sure why it's not
found because the header file is included.

Any ideas?

thankyou,
john.







                                                                           
             Matthias Urban                                                
             <matthias.urban at p                                             
             ure-systems.com>                                           To 
                                       John Hawkins/UK/IBM at IBMGB           
             18/08/2004 17:06                                           cc 
                                       aspectc-user                        
                                       <aspectc-user at aspectc.org>          
             Please respond to                                     Subject 
               aspectc-user            Re: [aspectc-user] __declspec       
                                       issues                              
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Hi John,

I simply forgot to set the aspectc-user list on the reply, my fault.


> That works great - but now I can't get it to work again :-(
> I'm running this command ->
>
> ac++
> -c
>
c:\DOCUME~1\administrator\mydocu~1\projects\cwss\code\build\ws-axis\c\src\soap\Attribute.cpp

>
> -o
>
c:\DOCUME~1\administrator\mydocu~1\projects\cwss\code\build\ws-axis\c\src\soap\Attribute.cppout

>
> -p.
> -a c:\tmp\TestTrace.ah
>
-Ic:\DOCUME~1\administrator\mydocu~1\projects\cwss\code\build\ws-axis\c\src\..\include

>
> -D_WIN32
> -DWIN32
> -D_MBCS
> -DUSRDLL
> -DAXISCLIENTDLL_EXPORTS
> -DAXIS_CLIENT_LIB
> -DENABLE_AXIS_EXCEPTION
> -D__cplusplus
> -D_WCHAR_T_DEFINED
> -D_M_IX86
> -D__STDC__
> --vc
> -V1
> --problem
> -Ic:\progra~1\micros~2\vc98\include
> -Amachine(i386)
> -Aplattform(win32)
>
> And ths is the output I see on the console ->
>
------------------------------------------------------------------------------------------------------------------------

> ac++ 0.9pre1 (Jul  7 2004)
>
> C:\Documents and Settings\Administrator\My
> Documents\projects\CWSS\code\Build>rem -D_MSC_VER=1300
>
------------------------------------------------------------------------------------------------------------------------

>
> I don't see my output file being created :-(


The ac++ command line options are case sensitive, so you have to use
"-v1" instead of "-V1". "-V" let ac++ print its version and then exit.


> And could I also ask - if I'm building a shared library with "aspected"
> code in -  how is a user of the code affected? Do they have to call my
> objects with different signatures now? Do they have to run this
pre-compile
> step too?


This directly depends on the aspects you apply and how and what you
weave. Users of shared libraries depend on the public headers of the
library so that only changes in the headers affect the use of the woven
library. If you are introducing new methods in classes the interface of
these classes change. But signatures of functions and methods are never
changed. The only thing you don't have to forget is to weave the library
headers using ac++'s "-i" command line option.

Matthias

--
Matthias Urban                          Phone: +49-391-544569-32
pure-systems GmbH                       Fax:   +49-391-544569-90





More information about the aspectc-user mailing list