Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to run program written for old compiler?
    text
    copied!<p>I'm looking for an implementation of Hybrid Tree(not important), and find an "old" one <a href="http://www-db.ics.uci.edu/pages/software/htree.shtml" rel="nofollow">here</a>.</p> <p>The author said they have tried this code on the SUN Sparc platform (running <strong>Solaris 2.6</strong>) and with <strong>gcc-2.8.1</strong> compiler. And my environment is <strong>gcc version 4.4.3</strong> (<strong>Ubuntu 10.10</strong>).</p> <p>The problem is: I run "make" with the makefile he provides, but it gives me lots of error message as follows:</p> <pre><code>g++ -c Node.C g++ -c DataNode.C In file included from DataNode.h:18, from DataNode.C:17: Query.h:9:20: error: vector.h: No such file or directory Query.h:10:19: error: stack.h: No such file or directory Query.h:13:22: error: function.h: No such file or directory Query.h:14:22: error: iostream.h: No such file or directory DataNode.C:283:8: warning: extra tokens at end of #endif directive In file included from DataNode.h:18, from DataNode.C:17: Query.h:29: warning: ‘typedef’ was ignored in this declaration Query.h:44: warning: ‘typedef’ was ignored in this declaration Query.h:86: error: expected initializer before ‘&lt;’ token Query.h:118: error: ISO C++ forbids declaration of ‘PQ’ with no type Query.h:118: error: expected ‘;’ before ‘*’ token Query.h:122: error: ISO C++ forbids declaration of ‘PQ’ with no type Query.h:122: error: expected ‘;’ before ‘*’ token Query.h:126: error: ISO C++ forbids declaration of ‘PQ’ with no type Query.h:126: error: expected ‘;’ before ‘*’ token Query.h:135: error: expected initializer before ‘&lt;’ token DataNode.C: In member function ‘void DataNode::DisconnectBranch(int)’: DataNode.C:80: error: ‘memmove’ was not declared in this scope make: *** [DataNode.o] Error 1 </code></pre> <p>I know I need to modify the souce code so as to agree with the morden compiler, such as change <code>vector.h</code> to <code>vector</code>. But I find it's just endless.</p> <p>So my question is: is there any convienent method to run this program, no matter automatically converting this code to "modern-style" or using a standalone "old-style" compiler ?</p> <p>Any suggestions? </p> <p>===<strong>Update:</strong>===</p> <p>Thank you all, I installed gcc2.8.1 in a different dir using <code>--prefix=/usr/local/gcc-2.8.1</code> and modify the "makefile" to use this old-version gcc(<code>/usr/local/gcc-2.8.1/bin/gcc</code>). But when I run "make", it still gives me errors of not finding the headers:</p> <pre><code>/usr/local/gcc-2.8.1/bin/gcc -c DataNode.C In file included from DataNode.h:18, from DataNode.C:17: Query.h:9: vector.h: No such file or directory Query.h:10: stack.h: No such file or directory Query.h:11: deque: No such file or directory Query.h:12: algorithm: No such file or directory Query.h:13: function.h: No such file or directory Query.h:14: iostream.h: No such file or directory make: *** [DataNode.o] Error 1 </code></pre> <p>Then I tried to find these heads in /usr/local/gcc-2.8.1 using <code>find /usr/local/gcc-2.8.1 -name "*vector*"</code>, but got nothing.</p> <p>So where are these heads for the old-version gcc?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload