On Mon, 5 Apr 2021, 17:03 Saloni Garg via Gcc-help, <gcc-help@xxxxxxxxxxx> wrote: > On Mon, Apr 5, 2021 at 8:42 PM Stefan Ring <stefanrin@xxxxxxxxx> wrote: > > > On Mon, Apr 5, 2021 at 3:19 PM Saloni Garg via Gcc-help > > <gcc-help@xxxxxxxxxxx> wrote: > > > > > > When I try to compile it with `cc1plus` via command : > > > ./cc1plus -fanalyzer example8.cpp > > > > Why do you want to use `cc1plus` instead of `g++`? > > > I want to use the build without installing it. Why? It's possible, but you have to tell GCC how to find all its library headers and runtime files. While using `xg++`, I get > the following error: > > xg++: fatal error: cannot execute ‘cc1plus’: execvp: No such file or > directory > compilation terminated. > Because you're not supposed to use it without installing it > Therefore I shifted to `cc1plus` as I mainly have to work only on C++. > That is not the right solution. You can use xg++ by providing all the right paths with -B and -I and -L but you should just install it and use it as intended.