delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/07/10/14:30:03

From: eschmidt AT safeaccess DOT com (EPerson)
Newsgroups: comp.os.msdos.djgpp
Subject: compiler errors with gxx -ansi
Date: 10 Jul 2003 11:28:20 -0700
Organization: http://groups.google.com/
Lines: 39
Message-ID: <6e5fc465.0307101028.73d38bc1@posting.google.com>
NNTP-Posting-Host: 64.24.105.84
X-Trace: posting.google.com 1057861700 17035 127.0.0.1 (10 Jul 2003 18:28:20 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: 10 Jul 2003 18:28:20 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

#include <iostream>

int main() {
  std::cout << "Hello, world!\n";
}

If I try to compile this with "gxx -ansi", I get a lot of errors in
the system libraries.

In file included from D:/DJGPP/lang/cxx/3.3/bits/locale_facets.tcc:41,
                 from D:/DJGPP/lang/cxx/3.3/locale:47,
                 from D:/DJGPP/lang/cxx/3.3/bits/ostream.tcc:37,
                 from D:/DJGPP/lang/cxx/3.3/ostream:535,
                 from D:/DJGPP/lang/cxx/3.3/iostream:45,
                 from test.cpp:1:
D:/DJGPP/lang/cxx/3.3/cmath:107: error: `acosf' not declared
D:/DJGPP/lang/cxx/3.3/cmath:110: error: `asinf' not declared
D:/DJGPP/lang/cxx/3.3/cmath:113: error: `atanf' not declared

etc.

D:/DJGPP/lang/cxx/3.3/cmath:184: error: `acosf' undeclared in
namespace `
   __gnu_cxx::__c99_binding'
D:/DJGPP/lang/cxx/3.3/cmath: In function `float std::asin(float)':
D:/DJGPP/lang/cxx/3.3/cmath:204: error: `asinf' undeclared in
namespace `
   __gnu_cxx::__c99_binding'
D:/DJGPP/lang/cxx/3.3/cmath: In function `float std::atan(float)':
D:/DJGPP/lang/cxx/3.3/cmath:222: error: `atanf' undeclared in
namespace `
   __gnu_cxx::__c99_binding'

etc.

This does not happen if I don't use -ansi. How can this be fixed?

-- 
Eric Schmidt

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019