Mail Archives: cygwin/2004/10/22/12:39:52
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 -