ctelroy / rapidjson

Automatically exported from code.google.com/p/rapidjson
MIT License
0 stars 0 forks source link

Linking Error in VS 2010 #97

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Getting a linker error when I try to compile my code on VS 2010 with rapidjson 
included.
Apparently msvc doesn't like the fact that an unused private class member is 
only declared.

In document.h, line 54:
GenericValue(const GenericValue& rhs);

change to:
GenericValue(const GenericValue& rhs) {}

and it links correctly

Original issue reported on code.google.com by tbtt...@gmail.com on 31 Jan 2014 at 8:07

GoogleCodeExporter commented 8 years ago
I would assume that there is another issue causing the linker error.  Usually 
VS2010 happily accepts undefined but unused(!) symbols.  So apparently VS2010 
(or your code) seems to require the copy constructor, where the empty 
definition would actually cause more problems. 

Can you post the detailed error message and maybe a minimal example?

Original comment by philipp....@gmail.com on 1 Feb 2014 at 7:13

GoogleCodeExporter commented 8 years ago
it may be the case that, a member variable of type Value or Document is placed 
inside a class, and that class needed to be copyable.

Original comment by milo...@gmail.com on 30 Jun 2014 at 5:01

GoogleCodeExporter commented 8 years ago
Maybe similar to this 
http://stackoverflow.com/questions/22471567/rapidjson-undefined-refrence

Original comment by milo...@gmail.com on 30 Jun 2014 at 5:05

GoogleCodeExporter commented 8 years ago
Ah. You are correct, Value/Document are currently used in copyable classes.

Original comment by tbtt...@gmail.com on 24 Jul 2014 at 11:07

GoogleCodeExporter commented 8 years ago

Original comment by milo...@gmail.com on 25 Jul 2014 at 1:30