Last modified: 2019-10-13
This is a course page of
David Casperson
Associate Professor
Computer Science
University of Northern British Columbia

CPSC 101: Computer Programming II (2007)

Fixing the compiler

To ensure that you are running the 3.3 version of g++, type

g++ -v
  
If this confirms that you are running version 3.3.2, stop here. Otherwise execute the commands:
PATH=/opt/sfw/gcc-3/bin:$PATH
export PATH
  
and try again.

A more permanent fix

Unfortunately, these commands must be typed every time that you start a shell. To avoid this, you might want to edit the file .bashrc in your home directory to include lines like:

PATH=/opt/sfw/gcc-3/bin:/opt/sfw/bin:/bin:/usr/bin:/usr/local/bin
export PATH
  
I am not certain what the exact PATH ought to be here. You might try typing echo $PATH to see what your default is, and tune it so that /opt/sfw/gcc-3/bin precedes /opt/sfw/bin.

Click to return to the cpsc 101 main page.

Home page Semesters Site Map
go back Winter 2007 go forward
2024-12 other links

Dates
CPSC 101
Syllabus
Old Exams
Labs
Project
David’s Schedule

fall-2024