delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/10/22/12:39:52

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Reply-To: Cygwin List <cygwin AT cygwin DOT com>
Message-Id: <6.1.0.6.0.20041022123016.04152410@pop.prospeed.net>
X-Sender:
Date: Fri, 22 Oct 2004 12:37:11 -0400
To: Harlan DOT Lewandowski AT gd-ais DOT com, cygwin AT cygwin DOT com
From: Larry Hall <lh-no-personal-replies-please AT cygwin DOT com>
Subject: Re: error: `::acosl' undeclared : #INCLUDE <cmath> and <fstream>
In-Reply-To: <6806E1D3EF34D3408250BFDA3D465AB713B61049@blcex01.mnb.gd-ai s.com>
References: <6806E1D3EF34D3408250BFDA3D465AB713B61049 AT blcex01 DOT mnb DOT gd-ais DOT com>
Mime-Version: 1.0

At 12:28 PM 10/22/2004, you wrote:
>Hello,
>
>I am compiling using the latest Cygwin.
>My main.cpp starts with:
>- - - - - -
>#include <cmath>
>#include <fstream>
>#include <iostream>
>#include <iomanip>
>#include <sstream>
>#include <stdio.h>
>#include "ims/c4s/sa/tuf/Tracker.h"
>#include "ims/c4s/sa/tuf/TrackInformation.h"
>using namespace std;
>- - - - - -
>My Makefile has:
>- - - - - -
>OPTIONS = -Wall,--subsystem,windows -mno-cygwin -O2 -g -pedantic \

                                     ^^^^^^^^^^^^

>            -Wpointer-arith -Wcast-qual -Wcast-align \
>            -Wwrite-strings -Wstrict-prototypes \
>            -Wmissing-prototypes -Wconversion
>    
>INCLUDES = -I./
>#INCLUDES += -IC:/cygwin/usr/include

                   ^^^^^^

>#INCLUDES += -I/cygdrive/c/cygwin/usr/include
>
>trackerTest: Main.cpp
>    g++ $(OPTIONS) \
>        $(INCLUDES) \
>        -o trackerTest \
>        Main.cpp \
>        $(LIBRARIES)
>- - - - - -
>Compiling, I get a line:
>   netinet/in.h: No such file or directory
>
>I then then tried un-commented-out one of the #INCLUDES line
>to get at the cygwin "netinet/in.h" file,
>It is just:
>- - - - -
>#ifndef _NETINET_IN_H
>#define _NETINET_IN_H
>
>#include <cygwin/in.h>
>
>#endif /* _NETINET_IN_H */
>- - - - -
>meaning that the useable version of in.h is:
>   C:/cygwin/usr/include/cygwin/in.h
>
>With that "fix",
>4 errors are seen below (per error type, I am only showing you the 1st of many).
>The "/usr/include/c++/3.3.3" is under C:\cygwin.
>
>The #INCLUDE for <cmath> and <fstream>
>seem to have problems with the latest Cygwin 3.3.3
>
>Can you help?


As I pointed to above, you're trying to compile a non-Cygwin executable
(-mno-cygwin) with using a Cygwin include file.  You can't mix and match
like that.  If you need the POSIX API, you have to compile without the
'-mno-cygwin' switch.  That, of course, pulls in 'cygwin1.dll' and, as 
a result, makes your result GPL'd, if that's an issue for you.  If you don't
want to use '-mno-cygwin', then you'll want to take this to the MinGW
list(s) (www.mingw.org). 


--
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
838 Washington Street                   (508) 893-9889 - FAX
Holliston, MA 01746                     


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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