installing GCC-4.9 without root - adding paths and binaries and extra

后端 未结 1 1797
情话喂你
情话喂你 2021-02-06 00:19

i just installed gcc 4.9 using the link here and it is a very good link. But I have only one problem which i dont want to try not to mess up --> linking the libraries and path v

相关标签:
1条回答
  • 2021-02-06 00:33

    If you build your compiler with --prefix=/home/myname/gcc4.9 (adjust to match your system, obviously), then the compiler should "know" that the include paths etc.

    All you need beyond that is to make sure your path has /home/myname/gcc4.9/bin before /usr/bin or wherever your other gcc is installed, and everything should work just like normal. On my machine, I have gcc 4.8.2 installed from my own build and gcc 4.6.3 from the linux installer for gcc (because it's a fairly old distro). And as long as I have the paths set in the right order, it works "automagically".

    You will need to set LD_LIBRARY_PATH, but include-paths and static libraries should be handled by gcc itself.

    0 讨论(0)
提交回复
热议问题