Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3D607140.6020805@ims.u-tokyo.ac.jp> Date: Mon, 19 Aug 2002 13:17:04 +0900 From: Michiel Jan Laurens de Hoon User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2 X-Accept-Language: nl, en-us, de, fr, hu, ja MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: g++ -mno-cygwin header problems, new.h ? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I am trying to use #include with g++ -mno-cygwin. My test program is $ cat test.c #include int main() { return 0; } which compiles fine with g++ without -mno-cygwin. To try the same with -mno-cygwin, I copied the c++ include files from c:\cygwin\usr\include\g++-3 to c:\cygwin\usr\include\mingw\g++-3 (as described in http://www.colomsat.net.co/freehost/ngiraldo/cppcygwin.html), and try to compile again with -mno-cygwin. Now I get lots of errors: $ g++ -mno-cygwin test.c In file included from /usr/local/include/g++-v3/backward/new.h:33, from /usr/include/mingw/g++-3/stl_algobase.h:52, from /usr/include/mingw/g++-3/vector:30, from test.c:1: /usr/local/include/g++-v3/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 /usr/local/include/g++-v3/backward/new.h:34, from /usr/include/mingw/g++-3/stl_algobase.h:52, from /usr/include/mingw/g++-3/vector:30, from test.c:1: /usr/local/include/g++-v3/new:79: `size_t' undeclared in namespace `std' /usr/local/include/g++-v3/new:79: declaration of `operator new' as non-function /usr/local/include/g++-v3/new:79: invalid declarator /usr/local/include/g++-v3/new:80: `size_t' undeclared in namespace `std' /usr/local/include/g++-v3/new:80: declaration of `operator new []' as ... and many more. I guess the problem starts when new.h is included, which is not a mingw include file. I get the same error if I try to use the c++ include files that come with the mingw distribution (using -I /mingw/include/g++-3, where /mingw is where I installed mingw). I am not sure why I get the deprecated warning, as I am using #include , not #include . Does anybody know what is the correct way to include the c++ header files with -mno-cygwin? Thanks in advance, Michiel de Hoon University of Tokyo, Human Genome Center. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/