NULL is defined in various system header files. The Unix compiler is not as current as it should be. The simplest fix is to add -DNULL=0 to the alias command that was recommended to simulate Boolean types. As a result, the alias command would be
alias CC "CC -DNULL=0 -Dtrue=1 -Dfalse=0 -Dbool=int -Dexplicit=\ "
CC: Warning: Option -05 passed to ld, if ld is invoked, ignored otherwise
The option is -O5, not -05.
"assign1.cpp", line 7: Warning: Last line in file "DoubleEnded.h" is not
terminated with a newline.
The last line of file DoubleEnded.h does not end with a newline.
Put one in.
ld:fatal:Symbol referencing errors no output written to a.out
You have not provided an implementation for some symbol or function that you refer to. Provide one.
TestStack.obj : error LNK2001: unresolved external symbol "public: int
const & __thiscall Stack<int>::Top(void)const "
Keep in mind that the compiler for the course is not Visual C++, so this question is largely irrelevant. Even so, here is the answer. The implementation of member function Stack<Object>::Top (complete signature for the instantiated class is in the error message) is missing from the project. Read the "compiler bugs" on the class page to see how to do separate compilation of templates in Visual C++.
You may have the old license in your path. Look in your .cshrc file for the following line and DELETE THE LINE (or simply comment it out).
setenv LM_LICENSE_FILE /home/share/license/license.dat
You probably do not have the . directory in your search path. You can tell by using ./a.out instead of a.out. If that's the problem, either prefix the executable with ./ every time you execute, or change your path to include . in it, by editing your .cshrc file. Look for path variables, and make a copy of .cshrc before making any changes to it.
Make an honest attempt on the first program. If you can't get it to work without alot of effort, you are in the wrong course.
Read Appendix A.2 on Page 760.
Read Appendix A.6.4 on Page 781.
The C++ compiler is CC, not cc.
The system runs a password-guessing program every night. If you have a trivial password that can be guessed, your account is disabled for security purposes. You will need to contact SERDAC. If this happens on the day the program is due, you are out of luck.
Your program has a bug that has been exposed.
You can redirect the output to a file and then print the file. For instance:
% program1 > outputYou can also get a transcript of a session by using the script command; you can then print the transcript.
You can get a handout in the PC labs, buy a Unix book, or use the man command.
Yes, provided there is space.
PDF files can be viewed and printed using Acrobat Reader, which is a free program available from Adobe.
Go to the AUL. From home, if you have a printer that understands postscript, then in an MS-DOS prompt, try
copy /b file.ps prn
The source code for the text is in the directory ~weiss/www/adsp/progs. You can copy files directly from there to your Unix directory. There is also source code for a different book; you can look at that to see other ways of doing things, but I expect you to be using the code for this text.
Add the following line to your .cshrc file to simulate newer constructs:
alias CC "CC -Dtrue=1 -Dfalse=0 -Dbool=int -Dexplicit=\ "Note that there is a space after the \ and that you will need to logon again. Do this after you are certain that you have the correct SunPro compiler.