The default OmniOS install contains only runtime-oriented packages. It does not include a compiler, linker, system headers, etc. All of those things are available from the “omnios” publisher, so they are easy to install, but it’s not obvious what the package names are.
To get a basic build environment set up, do the following with root privileges:
# pkg install developer/gcc48
# pkg install developer/gcc51
# pkg install developer/gcc47 system/library/math/header-math
# pkg install \ developer/build/autoconf \ developer/build/automake \ developer/lexer/flex \ developer/parser/bison \ developer/object-file \ developer/linker \ developer/library/lint \ developer/build/gnu-make \ library/idnkit \ library/idnkit/header-idnkit \ system/header \ system/library/math
This will get you enough to build most C/C++ software.
Note that GCC installs into /opt/gcc-