Good news:
I used NetBeans, and everything works fine. Also, I used the package from the repos, and added /usr/include and /usr/local/include for my include options, and the /usr/lib and /usr/local/lib for the libraries. Everything works.
However, I instead am now using the slightly outdated G++-4.9, which seems to, however, work fine.
Thanks for the suggestion of getting it from the repos instead.