Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

Support for g++ 4.6 #6

Closed
homer6 opened this issue May 27, 2014 · 3 comments
Closed

Support for g++ 4.6 #6

homer6 opened this issue May 27, 2014 · 3 comments

Comments

@homer6
Copy link

homer6 commented May 27, 2014

This is the current repository version for Ubuntu 12 Server LTS. It currently doesn't compile. Nice library design, though. Very impressed with the API!

@ghost
Copy link

ghost commented May 27, 2014

If you don't mind, you can use gcc-4.8 toolchain for ubuntu 12.04.

Here is a script to do this

  sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
  sudo apt-get update -qq
  sudo apt-get install -qq gcc-4.8 g++-4.8
  sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
  sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
  sudo apt-get install -qq gcc

Be careful it will replace libstdc++4.6 with 4.8 as well.

@homer6
Copy link
Author

homer6 commented May 27, 2014

Thank you very much. That addressed my issue.

A slight change to the Makefile

 g++ -O -std=c++11 json11.cpp test.cpp -o test -fno-rtti -fno-exceptions

And added #include <cstring> to test.cpp.

@homer6 homer6 closed this as completed May 27, 2014
@ghost
Copy link

ghost commented May 27, 2014

You're welcome.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant