#145 ]wxJSON v1.2.1] Windows Build Errors

wxJSON (16)

### Using NMAKE ###
nmake -fmakefile.vc WX_DIR=H:\path-to-wx\wxMSW-2.8.12 WX_UNICODE=1 WX_DEBUG=0 WX_SHARED=0
..\src\jsonreader.cpp(1853) : error C2371: 'byte' : redefinition; different basic types
C:\Program Files\Microsoft Visual Studio\VC98\include\rpcndr.h(172) : see declaration of 'byte'
NMAKE : fatal error U1077: 'cl' : return code '0x2'

### Using wxjson_vc8.sln ###
error C2371: 'byte' : redefinition; different basic types

In rpcndr.h it is typedefing byte to 'unsigned char'. In jsonreader.cpp it is 'union byte { unsigned char c[2]; short int b; };'. I've also tried using wxWidgets 2.9.3, and it gives the same error (plus more), but, 2.8.12 is what I want to work with.



  • DustinB

    DustinB - 2012-08-17
    • summary: 1.2.1 on Windows --> ]wxJSON v1.2.1] Windows Build Errors
  • Luciano Cattani

    Luciano Cattani - 2012-08-23

    hi, thanks gor your report. in the source file src/jsonreader.cpp line 1853 i am defining the 'union byte' which is already defined by the VC++ compiler somewhere. the error does not apear with other compilers which do not define 'byte' as a symbol.
    the 'union byte' type is used in the memory-buffer JSON type which is a wxJSON extension. Moreover, the implementation of that feature is not yet complete. You may simply rename the 'union byte' structure as 'wxJSON_byte' and all occurrences of it in the wxJSONReader::ReadMemoryBuff() function.
    I will soon update the sources.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks