<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hello all,<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>I’m having trouble with running the example interactive program from the tutorial.  I simply cut and pasted it, but after it asks for “an expression involving ‘x’ “ it just hangs and never does anything.  The problem seems to be in the line  ‘ex e = reader(cin)’, I got the other examples to run just fine, but the reader(cin) seems to be problematic.</div><div><br></div><div>My setup: Macbook Air1.5GHZ i7, OSX 10.9.1, ginac 1.6.2</div><div><br></div><div>My program:</div><div><br></div><div><div style="margin: 0px; font-family: Menlo; color: rgb(209, 47, 27);"><span style="color: #78492a">#include </span><iostream></div><div style="margin: 0px; font-family: Menlo; color: rgb(120, 73, 42);">#include <span style="color: #d12f1b"><string></span></div><div style="margin: 0px; font-family: Menlo; color: rgb(209, 47, 27);"><span style="color: #78492a">#include </span><stdexcept></div><div style="margin: 0px; font-family: Menlo; color: rgb(209, 47, 27);"><span style="color: #78492a">#include </span><ginac/ginac.h></div><div style="margin: 0px; font-family: Menlo; color: rgb(187, 44, 162);"><span style="color: #000000">    </span>using<span style="color: #000000"> </span>namespace<span style="color: #000000"> std;</span></div><div style="margin: 0px; font-family: Menlo; color: rgb(187, 44, 162);"><span style="color: #000000">    </span>using<span style="color: #000000"> </span>namespace<span style="color: #000000"> GiNaC;</span></div><div style="margin: 0px; font-family: Menlo;">    <span style="color: #bb2ca2">int</span> main()</div><div style="margin: 0px; font-family: Menlo;">    {</div><div style="margin: 0px; font-family: Menlo; color: rgb(209, 47, 27);"><span style="color: #000000">        cout << </span>"Enter an expression containing ’x’: "<span style="color: #000000"> << flush;</span></div><div style="margin: 0px; font-family: Menlo;">        parser reader;</div><div style="margin: 0px; font-family: Menlo;">        <span style="color: #bb2ca2">try</span> {</div><div style="margin: 0px; font-family: Menlo;">            ex e = reader(cin);</div><div style="margin: 0px; font-family: Menlo;">            symtab table = reader.get_syms();</div><div style="margin: 0px; font-family: Menlo;">            symbol x = table.find(<span style="color: #d12f1b">"x"</span>) != table.end() ?</div><div style="margin: 0px; font-family: Menlo;">            ex_to<symbol>(table[<span style="color: #d12f1b">"x"</span>]) : symbol(<span style="color: #d12f1b">"x"</span>);</div><div style="margin: 0px; font-family: Menlo; color: rgb(209, 47, 27);"><span style="color: #000000">            cout << </span>"The derivative of "<span style="color: #000000"> << e << </span>" with respect to x is "<span style="color: #000000">;</span></div><div style="margin: 0px; font-family: Menlo;">            cout << e.diff(x) << <span style="color: #d12f1b">"."</span> << endl;</div><div style="margin: 0px; font-family: Menlo;">        } <span style="color: #bb2ca2">catch</span> (exception &p) {</div><div style="margin: 0px; font-family: Menlo;">            cerr << p.what() << endl;</div><div style="margin: 0px; font-family: Menlo;">        }</div><div style="margin: 0px; font-family: Menlo;">    }</div></div><div style="margin: 0px; font-family: Menlo;"><br></div><div style="margin: 0px; font-family: Menlo;"><br></div><div style="margin: 0px; font-family: Menlo;"><br></div><div style="margin: 0px; font-family: Menlo;"><br></div><div style="margin: 0px; font-family: Menlo;">Commandline:</div><div style="margin: 0px; font-family: Menlo;"><br></div><div style="margin: 0px; font-family: Menlo;"><div style="margin: 0px; font-size: 11px;">Caseys-MacBook-Air:ginac casey$ g++ ginacPlay.cpp -o ginacPlay.out -lginac -lcln </div><div style="margin: 0px; font-size: 11px;">Caseys-MacBook-Air:ginac casey$ ./ginacPlay.out </div><div style="margin: 0px; font-size: 11px;">Enter an expression containing ’x’: x</div><div style="margin: 0px; font-size: 11px;">^C</div><div>…It just hangs there for several minutes.</div></div><div style="margin: 0px; font-family: Menlo;"><br></div></body></html>