#11 attributeGetters not compiling

closed-fixed
5
2001-12-13
2001-11-01
Maurice Gilmore
No

Using the proxy generator and setting the generation
at attributeSetter's to true results in generation
of code that does not compile. AttributeGetter's work
fine.

As an example below is the output from using the
demo proxy example with project.xml file of :-

<?xml version="1.0"?>

<project name="tutorial" targetType="exe"
targetName="proxyTutorial">
<proxygen destructive="false"
attributeSetters="true" attributeGetters="true">
<input-classes>
<input-class
name="demo.proxygen.tutorial.MyCoolClass"/>
</input-classes>
</proxygen>
<nmakefile name="tutorial.mak"/>
<gnumakefile name="Makefile"/>
</project>

Results in errors during compiling for each attribute
getter. Complete compile list below :-

generate:
[java] generating C++ Proxy Class for
demo.proxygen.tutorial.MyCoolClass ...
[java] generating NMakefile for project
tutorial ...
[java] generating GNU Makefile for project
tutorial ...
[java]
[java] code generation complete.

native:
[exec]
[exec] Microsoft (R) Program Maintenance
Utility Version 6.00.8168.0
[exec] Copyright (C) Microsoft Corp 1988-1998.
All rights reserved.
[exec] cl.exe @C:\DOCUME~1\PILZ~1.DEV\LOCALS~1
\Temp\nma01316. /nologo /GX /W3 /FD

/D "WIN32" /D "_WINDOWS" /D "
_MBCS" /I .\ /I "c:\jbuilder4
\jdk1.3/include" /I "c:\jbuilder4
\jdk1.3/include/win32" /I

"C:\jni\jnipp0.3\jnipp-win32-x86
-
0.3/include" /c /MDd /Zi /Od /D "_DEBUG" /Fo.\demo\prox
ygen\tutorial\MyCoolClassProxy_d.obj

.\demo\proxygen\tutorial\My
CoolClassProxy.cpp
[exec]
[exec] MyCoolClassProxy.cpp

[exec] .\demo\proxygen\tutorial\MyCoolClassProxy.cpp
(57) : error C2662:

'_getPeerObject' : cannot convert 'this' po
inter from 'const class
demo::proxygen::tutorial::MyCoolClassProxy' to 'class

demo::proxygen::tutorial::MyCoolClassProxy
&'
[exec] Conversion loses qualifiers
[exec] NMAKE : fatal error U1077: 'cl.exe' :
return code '0x2'
[exec] Stop.
[exec] Result: 2
[exec]
[exec] Microsoft (R) Program Maintenance
Utility Version 6.00.8168.0
[exec] Copyright (C) Microsoft Corp 1988-1998.
All rights reserved.
[exec]
[exec] cl.exe @C:\DOCUME~1\PILZ~1.DEV\LOCALS~1
\Temp\nma01288. /nologo /GX /W3 /FD

/D "WIN32" /D "_WINDOWS" /D "
_MBCS" /I .\ /I "c:\jbuilder4
\jdk1.3/include" /I "c:\jbuilder4
\jdk1.3/include/win32" /I

"C:\jni\jnipp0.3\jnipp-win32-x86
-
0.3/include" /c /MD /O2 /D "NDEBUG" /Fo.\demo\proxygen\ tutorial\MyCoolClassProxy.obj

.\demo\proxygen\tutorial\MyCoolCla
ssProxy.cpp
[exec] MyCoolClassProxy.cpp

[exec] .\demo\proxygen\tutorial\MyCoolClassProxy.cpp
(57) : error C2662:

'_getPeerObject' : cannot convert 'this' po
inter from 'const class
demo::proxygen::tutorial::MyCoolClassProxy' to 'class

demo::proxygen::tutorial::MyCoolClassProxy
&'
[exec] Conversion loses qualifiers
[exec] NMAKE : fatal error U1077: 'cl.exe' :
return code '0x2'
[exec] Stop.
[exec] Result: 2

Discussion

  • compiler output with errors

     
    Attachments
    • assigned_to: nobody --> ptrewhella
    • status: open --> closed-fixed
     
  • Logged In: YES
    user_id=123204

    Modified the code generator to generate the _getPeerObject
    () method as a const.