tomerfiliba / agnos

Agnos - The Agnostic RPC Framework
http://agnos.sourceforge.net
Other
14 stars 7 forks source link

C++ setting an enum as an argument error #47

Closed Setiram closed 13 years ago

Setiram commented 13 years ago

Hi, I'm trying out Agnos and encountering this scenario

I've defined an enumeration "EnumVal" and then used that enumeration as an argument in a function. I then compiled it using the agnos compiler version 1.0.1. When I try to compile the generated code, it fails with the following errors:

TestService_server_bindings.hpp:35:24: error: ‘EnumVal’ has not been declared TestService_server_bindings.cpp: In member function ‘virtual void TestService::ServerBindings::Processor::process_invoke(int32_t)’: TestService_server_bindings.cpp:120:16: error: ‘_EnumVal_packer’ was not declared in this scope TestService_server_bindings.cpp:121:47: error: ‘EnumVal’ was not declared in this scope TestService_server_bindings.cpp:123:34: error: ‘EnumVal’ cannot appear in a constant-expression TestService_server_bindings.cpp:123:51: error: no matching function for call to ‘any_cast(boost::any&)’

I checked the generated code and the enum "EnumVal" is not defined anywhere.

tomerfiliba commented 13 years ago

could you attach the IDL and the generated server bindings header file to this ticket? (you can use http://gist.github.com)

thanks.

Setiram commented 13 years ago

Hi, I've placed it here.

https://gist.github.com/1167297

cheers.

tomerfiliba commented 13 years ago

thanks. i'm on it.