small explanation about (lack of) logging in optimized builds
authorCraig Dowell <craigdo@ee.washington.edu>
Fri, 19 Mar 2010 15:54:01 -0700
changeset 6151 9f2dea6094da
parent 6106 f64266d592a4
child 6152 f7c2738b874f
small explanation about (lack of) logging in optimized builds
doc/tutorial/getting-started.texi
--- a/doc/tutorial/getting-started.texi	Fri Mar 05 11:15:20 2010 -0800
+++ b/doc/tutorial/getting-started.texi	Fri Mar 19 15:54:01 2010 -0700
@@ -601,6 +601,34 @@
 
 @emph{Congratulations.  You are now an ns-3 user.}
 
+@emph{What do I do if I don't see the output?}
+
+If you don't see @code{waf} messages indicating that the build was 
+completed successfully, but do not see the ``Hello Simulator'' output, 
+chances are that you have switched your build mode to ``optimized'' in 
+the ``Building with Waf'' section, but have missed the change back to 
+``debug'' mode.  All of the console output used in this tutorial uses a 
+special @command{ns-3} logging component that is useful for printing 
+user messages to the console.  Output from this component is 
+automatically disabled when you compile optimized code -- it is 
+``optimized out.''  If you don't see the ``Hello Simulator'' output,
+type the following,
+
+@verbatim
+  ./waf -d debug configure
+@end verbatim
+
+to tell @code{waf} to build the debug versions of the @command{ns-3} 
+programs.  You must still build the actual debug version of the code by
+typing,
+
+@verbatim
+  ./waf
+@end verbatim
+
+Now, if you run the @code{hello-simulator} program, you should see the 
+expected output.
+
 If you want to run programs under another tool such as gdb or valgrind,
 see this @uref{http://www.nsnam.org/wiki/index.php/User_FAQ#How_to_run_NS-3_programs_under_another_tool,,wiki entry}.