Sun Studio Introduction Demo (7 Minutes)
Description
This demo provides a brief introduction to Sun Studio.
OpenSolaris Versions Supported
2008.05 or newer.
Points to Hit
- Sun Studio are compilers and IDE of choice for developers running Solaris or Linux.
- Sun Studio makes you more productive by features such as code completion, local history and other editing features.
- Sun Studio manages project configurations for you, so you can switch between a development build and a release easily.
Demo Prep
Install the ss-dev package.
Gotchas
None known.
Demo
- Start Sun Studio by running /opt/SunStudioExpress/bin/sunstudio
- Open file Welcome.cc using project explorer and look at the source code.
- Run the main project using Run | Run main project. Specify a parameter in the opened console.
- Add a breakpoint on line 51 and run the debugger using Run | Debug main project.
- Look at variables using the Variables tab in debugger
- Add a watch for variable i. Press continue and observe the changes of the variable.
- Go to terminal and switch directory by running cd ~/SunStudioProjects/Welcome/dist/Debug
- Run ./welcome
- Run ./welcome 1 2 3
- Go back to Sun Studio. Choose Release in the combo box above the editor to switch the current configuration to release.
- Rebuild the project.
- Go back to the terminal and go to cd ~/SunStudioProjects/Welcome/dist.
- Run ls to see available configurations.
- Run ls -la Debug Release. Notice differences in file sizes.
Demo Cleanup
Delete the project created during demo.