GCC is installed on Solaris 10 by default. It is located in/usr/SFW/bin/GCC and needs to be installed manually on port 11. Command is
PKG install gcc-3
After installation
/Usr/SFW/bin/GCC
Then you can use it.
/Usr/SFW/bin/GCC-V/usr/SFW/bin/GCC helloworld. c
After logging on, the user edits the. profile file, and shadow GCC as the installed GCC program.
Path = $ path:/usr/SFW/binexport path
After restart, you can directly use GCC.
Gcc-VGCC helloworld. c
References:
[1] installing GCC on Oracle Solaris 11. http://stackoverflow.com/questions/4664472/installing-gcc-on-oracle-solaris-11
[2] GCC not found. http://blog.csdn.net/yang15225094594/article/details/7922079
[3] GCC environment variables in Solaris 10. http://bbs.csdn.net/topics/240056395
[3] basic usage of VI editing under Solaris. http://blog.sina.com.cn/s/blog_405066070100nlrr.html