-2

The rapidjson build within Xcode 5.1.1 is already old. I found the FileStream class which is already deprecated and there is no FileReadStream.

Anyone know How to update rapidjson in Xcode 5.1.1?

Peter Clark
  • 2,863
  • 3
  • 23
  • 37
  • Just to verify - you are talking about using rapidjson in your own Xcode project correct? Your question is a little vague. – Peter Clark Aug 09 '14 at 21:33
  • Yup. when i type include in Xcode rapidjason already there and it's old. What i mean is how to update this rapidjason. I will try to download and install as u suggested. – Anthony Tran Aug 10 '14 at 17:22
  • Edited my answer with more details on what I recommend trying. Unfortunately my mac is out of commission at the moment so I can't verify (and I've only briefly touched Xcode in the past). If someone gives an answer on how to update the actual libraries you might look into that, but my method should be applicable regardless of build environment to my knowledge. I use it with both Visual Studio and with GCC on linux with no issue. – Peter Clark Aug 10 '14 at 19:21
  • Also note that I added a [link to an issue on the rapidjson github repo](https://github.com/miloyip/rapidjson/issues/54) discussing versions in which the maintainer of the repo suggests using the old [tagged versions in the google code repo](https://code.google.com/p/rapidjson/downloads/list) until they have a new release (if you want a stable release). It might be worth noting that these versions are somewhat old (from my understanding rapidjson development only recently picked back up), so they might even be the ones you already have. – Peter Clark Aug 10 '14 at 19:25
  • 1
    Thank you! @PeterClark. it works. I download git include folder and externally include it in my project. – Anthony Tran Aug 11 '14 at 02:17

1 Answers1

1

rapidjson is a header only library, you should be able to just grab the latest version from the rapidjson git repository and place the files in your project/system's include path.

Note that this repository is in active development and I don't see any official stable releases yet, so you may also want to check out its old home at google code. This is discussed in this issue on the github repo.

I'm not sure about updating the libraries that come with Xcode specifically. You should be fine with just adding the rapidjson header files somewhere on your machine - either with the rest of your include files or in a directory which you specify to GCC as being an include directory using the -I(include directory here) command line option.

For example:

-I"external/includes" if you place the rapidjson files in the relative directory external/includes/rapidjson and use #include <rapidjson/(rapidjson file name)> when including a rapidjson file.

If you do either of those GCC will look there before looking in the system include paths (where XCode most likely installed rapidjson), and use the newer files you provided. I don't have any personal experience with LLVM, but I'd assume they would handle include files the same way (though the command line option may be different).

Peter Clark
  • 2,863
  • 3
  • 23
  • 37