I am trying to compile a c++ program using g++. When I do it as root, it's all good. When I do it as another user (who has some fairly restricted access), I get:
fatal error: iostream: No such file or directory compilation terminated.
The code itself is just
#include <iostream>
using namespace std;
int main()
{}
So basically it does nothing, since it won't compile if it's more complicated. Any ideas?
A few things to mention:
When I run a very basic program (just the last two lines, no includes etc), I get g++-5: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found compilation terminated
Ubuntu version is 16.04, 64 bit, server.
which g++ gives /usr/bin/g++
-I
flag; the-L
is for library linkage only. You could also edit your question to include the output of the following commandg++ -E -x c++ - -v < /dev/null
.which g++
andg++ --version
. Thanks. Also - what Ubuntu version are you using?