This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: error: `::acosl' undeclared : #INCLUDE <cmath> and <fstream>


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]