I am looking for a hybrid tree implementation (not important) and find the "old" here .
The author said that they tried this code on the SUN Sparc platform (running Solaris 2.6 ) and with the gcc-2.8.1 compiler. And my gcc environment is version 4.4.3 ( Ubuntu 10.10 ).
The problem is this: I run "make" with the makefile that it provides, but it gives me a lot of error messages as follows:
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 '<' 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 '<' 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
I know that I need to change the access code to accept the morden compiler, for example change vector.h
to vector
. But I find it just endless.
So my question is: is there any convienent method to run this program, regardless of whether it automatically converts this code to a "modern style" or using a stand-alone "old style" compiler?
Any suggestions?
=== Update: ===
Thanks to everyone, I installed gcc2.8.1 to another directory using --prefix=/usr/local/gcc-2.8.1
and changed the "makefile" to use this old version of gcc ( /usr/local/gcc-2.8.1/bin/gcc
). But when I run "make", it still gives me errors in the absence of headers:
/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
Then I tried to find these chapters in / usr / local / gcc -2.8.1 using find /usr/local/gcc-2.8.1 -name "*vector*"
but got nothing.
So where are these heads for the old version of gcc?
teloon
source share