X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Datnhan Newsgroups: comp.os.msdos.djgpp Subject: How can I compile C++ code (write for Linux) with DJGPP? Date: Tue, 11 Nov 2008 06:23:12 -0800 (PST) Organization: http://groups.google.com Lines: 85 Message-ID: NNTP-Posting-Host: 125.214.52.76 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1226413395 6693 127.0.0.1 (11 Nov 2008 14:23:15 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Tue, 11 Nov 2008 14:23:15 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: d42g2000prb.googlegroups.com; posting-host=125.214.52.76; posting-account=Ji3I0goAAABpc8urqLW3kOBLwkYJ3IWf User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b1) Gecko/20081007 Firefox/3.1b1,gzip(gfe),gzip(gfe) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi, I found a source code for Linux/Unix from the webpage: http://www.cs.loyola.edu/~cgiannel/assoc_gen.html I guessed the code was written around 1996. I tried to compile it with DJGPP version 2.03 download from http://www.delorie.com/djgpp/, run on Windows XP Professional. But I received many errors. I am sure that the code was compiled succcessfully previously, because I read many papers which used this program. Warnings can be ignored. Errors can be found after the line filled with asterisks in the text below. The errors occur in gen.h and gen.c. If anyone know how to solve the problem, please help! Thank you very much. gpp -c -o ran1.o ran1.C gpp -c -o expdev.o expdev.C gpp -c -o gammln.o gammln.C gpp -c -o gasdev.o gasdev.C gpp -c -o poidev.o poidev.C poidev.C:3:1: warning: "PI" redefined In file included from poidev.C:1: d:/djgpp/include/math.h:60:1: warning: this is the location of the previous definition gpp -c -o dist.o dist.C gpp -c -o gen.o gen.C In file included from d:/djgpp/bin/../lib/gcc/djgpp/4.23/../../../../ include/cxx/4.23/backward/stream.h:31, from gen.h:3, from gen.C:1: d:/djgpp/bin/../lib/gcc/djgpp/4.23/../../../../include/cxx/4.23/ backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C ++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated. In file included from gen.C:1: ******************************************************************* gen.h:185: error: 'StringSet' has not been declared gen.C: In member function 'void Taxonomy::write_asc(std::ofstream&)': gen.C:183: error: 'setw' was not declared in this scope gen.C: In member function 'void ItemSet::display(std::ofstream&)': gen.C:334: error: 'setprecision' was not declared in this scope gen.C: In member function 'void String::display(std::ofstream&, LINT)': gen.C:380: error: 'setw' was not declared in this scope gen.C: At global scope: gen.C:387: error: prototype for 'void String::display(std::ofstream&, StringSet&, LINT)' does not match any in class 'String' gen.h:185: error: candidates are: void String::display(std::ofstream&, int&, LINT) gen.C:378: error: void String::display(std::ofstream&, LINT) gen.C: In member function 'void String::display(std::ofstream&, StringSet&, LINT)': gen.C:392: error: 'setw' was not declared in this scope gen.C: In member function 'void StringSet::display(std::ofstream&)': gen.C:580: error: 'setprecision' was not declared in this scope gen.C:584: error: call of overloaded 'display(std::basic_ofstream >&, LINT&)' is ambiguous gen.C:378: note: candidates are: void String::display(std::ofstream&, LINT) gen.h:185: note: void String::display(std::ofstream&, int&, LINT) gen.C:587: error: call of overloaded 'display(std::basic_ofstream >&, LINT&)' is ambiguous gen.C:378: note: candidates are: void String::display(std::ofstream&, LINT) gen.h:185: note: void String::display(std::ofstream&, int&, LINT) gen.C: In member function 'void StringSet::display(std::ofstream&, StringSet&)': gen.C:597: error: 'setprecision' was not declared in this scope gen.C: In member function 'void Transaction::write_asc(std::ofstream&, LINT)': gen.C:775: error: 'setw' was not declared in this scope make.exe: *** [gen.o] Error 1