How to install g ++ on FreeBSD?

On my server with FreeBSD 10.0, I get the following error:

# make
/usr/bin/g++ crypto.cpp md4.cpp rsalib1.cpp base64.cpp cmdbase.cpp signer.cpp wmsigner.cpp -o wmsigner
make: exec(/usr/bin/g++) failed (No such file or directory)
*** Error code 1

Stop.
make: stopped in /tmp/wmsigner-2.0.3

/usr/bin/g++ does not exist, how to install / fix it?

+4
source share
2 answers

gccstill available on FreeBSD under ports. To install the latest version (starting with this entry, 4.9) as a port, follow these steps:

cd /usr/ports/lang/gcc49/ && make install clean

If you want to install it as a package, follow these steps:

pkg install lang/gcc49

This will set the front ends of the C, C ++, Fortran and Java like gcc49, g++49, gfortran49and gcj49respectively.

+7
source

It was renamed to FreeBSD 10. Fixed by creating a symlink in / usr / bin:

g++@ -> /usr/bin/clang++
-4
source

Source: https://habr.com/ru/post/1537264/


All Articles