I would like some help getting started with CppWamp

93 views
Skip to first unread message

nico....@gmail.com

unread,
Apr 28, 2016, 4:30:28 PM4/28/16
to CppWAMP
Hello, 

I am trying to get started with CppWamp (v0.6.2) on a Windows 7 system and I ran into some issues when building the chat example. 

I have pulled a fresh copy of rapidjson and made a project with the main from cppwamp/examples/chat. This project also has the required boost 1.59 libs (statically build for minGW-w64 gcc 5.3.0). 
I included the rapidjson headers, the boost headers (all to be sure) and headers and the source file from cppwamp/cppwamp/.

When I try to build this using minGW-w64 gcc 5.3.0 with the C++11 flag I get a compiler error that says: 
src\rapidjson\reader.h|1321|error: 'class wamp::internal::JsonVariantBuilder' has no member named 'RawNumber'

JsonVariantBuilder is implemeneted in cppwamp/cppwamp/internal/json.ipp and is an instance of VariantBuilder as defined in cppwamp/cppwamp/intrenal/variantbuilder.hpp

Both VariantBuilder and wamp::internal::JsonVariantBuilder do indeed not have a member function named RawNumber.
From the calls it seems this function should look something like:
      bool RawNumber(TargetEncoding::Ch* str, std::size_t length, bool dontParseInSitu);

Has something been changed in rapidjson that broke the example?
Is there anyone who has encountered this before and if so, is there an already known solution?
Is there anyone who knows what data the member RawNumber should contain?

Kind regards, Nico



src\rapidjson\reader.h||In instantiation of 'void rapidjson::GenericReader<SourceEncoding, TargetEncoding, StackAllocator>::ParseNumber(InputStream&, Handler&) [with unsigned int parseFlags = 0u; InputStream = wamp::internal::IStreamWrapper<std::basic_istream<char> >; Handler = wamp::internal::JsonVariantBuilder; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator]':

src\rapidjson\reader.h|1379|required from 'void rapidjson::GenericReader<SourceEncoding, TargetEncoding, StackAllocator>::ParseValue(InputStream&, Handler&) [with unsigned int parseFlags = 0u; InputStream = wamp::internal::IStreamWrapper<std::basic_istream<char> >; Handler = wamp::internal::JsonVariantBuilder; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator]'

src\rapidjson\reader.h|498|required from 'rapidjson::ParseResult rapidjson::GenericReader<SourceEncoding, TargetEncoding, StackAllocator>::Parse(InputStream&, Handler&) [with unsigned int parseFlags = 0u; InputStream = wamp::internal::IStreamWrapper<std::basic_istream<char> >; Handler = wamp::internal::JsonVariantBuilder; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator]'

src\rapidjson\reader.h|524|required from 'rapidjson::ParseResult rapidjson::GenericReader<SourceEncoding, TargetEncoding, StackAllocator>::Parse(InputStream&, Handler&) [with InputStream = wamp::internal::IStreamWrapper<std::basic_istream<char> >; Handler = wamp::internal::JsonVariantBuilder; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator]'

src\cppwamp\internal\json.ipp|53|required from 'void wamp::internal::decodeJson(TStream&, wamp::Variant&) [with TStream = wamp::internal::IStreamWrapper<std::basic_istream<char> >]'

src\cppwamp\internal\json.ipp|247|required from here

src\rapidjson\reader.h|1321|error: 'class wamp::internal::JsonVariantBuilder' has no member named 'RawNumber'

src\rapidjson\reader.h|1333|error: 'class wamp::internal::JsonVariantBuilder' has no member named 'RawNumber'


Emile Cormier

unread,
Apr 28, 2016, 4:36:58 PM4/28/16
to nico....@gmail.com, CppWAMP
RapidJson may have recently made a breaking change that affects all platforms. I have not updated RapidJson in quite a while, so it's possible the problem you reported affects Linux platforms as well. When I have the chance, I'll try to update my copy of RapidJson and see if I encounter the same problem.

--
You received this message because you are subscribed to the Google Groups "CppWAMP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cppwamp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cppwamp/bba5c166-f2a7-46d9-a294-1ce6a89e012f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Emile Cormier

unread,
Apr 28, 2016, 8:03:44 PM4/28/16
to CppWAMP, nico....@gmail.com
Nico,

Try reverting RapidJSON back to revision f36af30531bc1cfa4f26d798ba1ef668812b8fd0 and see if that works. That's the revision I'm currently using.

Cheers,
Emile


On Thursday, April 28, 2016 at 5:36:58 PM UTC-3, Emile Cormier wrote:
RapidJson may have recently made a breaking change that affects all platforms. I have not updated RapidJson in quite a while, so it's possible the problem you reported affects Linux platforms as well. When I have the chance, I'll try to update my copy of RapidJson and see if I encounter the same problem.
Hello, 

I am trying to get started with CppWamp (v0.6.2) on a Windows 7 system and I ran into some issues when building the chat example. 

I have pulled a fresh copy of rapidjson and made a project with the main from cppwamp/examples/chat. This project also has the required boost 1.59 libs (statically build for minGW-w64 gcc 5.3.0). 
I included the rapidjson headers, the boost headers (all to be sure) and headers and the source file from cppwamp/cppwamp/.

When I try to build this using minGW-w64 gcc 5.3.0 with the C++11 flag I get a compiler error that says: 
src\rapidjson\reader.h|1321|error: 'class wamp::internal::JsonVariantBuilder' has no member named 'RawNumber'

JsonVariantBuilder is implemeneted in cppwamp/cppwamp/internal/json.ipp and is an instance of VariantBuilder as defined in cppwamp/cppwamp/intrenal/variantbuilder.hpp

Both VariantBuilder and wamp::internal::JsonVariantBuilder do indeed not have a member function named RawNumber.
From the calls it seems this function should look something like:
      bool RawNumber(TargetEncoding::Ch* str, std::size_t length, bool dontParseInSitu);

Has something been changed in rapidjson that broke the example?
Is there anyone who has encountered this before and if so, is there an already known solution?
Is there anyone who knows what data the member RawNumber should contain?

Kind regards, Nico



src\rapidjson\reader.h||In instantiation of 'void rapidjson::GenericReader<SourceEncoding, TargetEncoding, StackAllocator>::ParseNumber(InputStream&, Handler&) [with unsigned int parseFlags = 0u; InputStream = wamp::internal::IStreamWrapper<std::basic_istream<char> >; Handler = wamp::internal::JsonVariantBuilder; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator]':

src\rapidjson\reader.h|1379|required from 'void rapidjson::GenericReader<SourceEncoding, TargetEncoding, StackAllocator>::ParseValue(InputStream&, Handler&) [with unsigned int parseFlags = 0u; InputStream = wamp::internal::IStreamWrapper<std::basic_istream<char> >; Handler = wamp::internal::JsonVariantBuilder; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator]'

src\rapidjson\reader.h|498|required from 'rapidjson::ParseResult rapidjson::GenericReader<SourceEncoding, TargetEncoding, StackAllocator>::Parse(InputStream&, Handler&) [with unsigned int parseFlags = 0u; InputStream = wamp::internal::IStreamWrapper<std::basic_istream<char> >; Handler = wamp::internal::JsonVariantBuilder; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator]'

src\rapidjson\reader.h|524|required from 'rapidjson::ParseResult rapidjson::GenericReader<SourceEncoding, TargetEncoding, StackAllocator>::Parse(InputStream&, Handler&) [with InputStream = wamp::internal::IStreamWrapper<std::basic_istream<char> >; Handler = wamp::internal::JsonVariantBuilder; SourceEncoding = rapidjson::UTF8<>; TargetEncoding = rapidjson::UTF8<>; StackAllocator = rapidjson::CrtAllocator]'

src\cppwamp\internal\json.ipp|53|required from 'void wamp::internal::decodeJson(TStream&, wamp::Variant&) [with TStream = wamp::internal::IStreamWrapper<std::basic_istream<char> >]'

src\cppwamp\internal\json.ipp|247|required from here

src\rapidjson\reader.h|1321|error: 'class wamp::internal::JsonVariantBuilder' has no member named 'RawNumber'

src\rapidjson\reader.h|1333|error: 'class wamp::internal::JsonVariantBuilder' has no member named 'RawNumber'


--
You received this message because you are subscribed to the Google Groups "CppWAMP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cppwamp+unsubscribe@googlegroups.com.

Emile Cormier

unread,
Apr 29, 2016, 2:13:54 PM4/29/16
to CppWAMP, nico....@gmail.com
I'm glad to hear you got it working on a Windows platform. :-) I'll fix CppWAMP to support the latest RapidJSON as soon as I'm able.

Emile Cormier

unread,
Jul 27, 2016, 11:08:34 AM7/27/16
to CppWAMP
In case you haven't noticed, I made a release about a month ago that fixes the "RawNumber" problem you described.
Reply all
Reply to author
Forward
0 new messages