delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/03/20/21:27:25

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
User-Agent: Mutt/1.5.5.1i Hamster-Fr/2.0.1.10
Date: Sun, 21 Mar 2004 01:40:57 +0100
From: Luc Hermitte <hermitte AT free DOT fr>
To: Feng Y <feng6 AT uwindsor DOT ca>
Cc: cygwin AT cygwin DOT com
Subject: Re: Problem when compiling c++ using gcc
Message-ID: <20040321004057.GA1204@jade>
References: <1079696928 DOT 10718 DOT ezmlm AT cygwin DOT com> <web-38801349 AT uwindsor DOT ca>
Mime-Version: 1.0
In-Reply-To: <web-38801349@uwindsor.ca>
X-Operating-System: CYGWIN_NT-5.1
X-IsSubscribed: yes

Hello,

* On Sat, Mar 20, 2004 at 03:46:34AM -0500, Feng Y <feng6 AT uwindsor DOT ca> wrote:
>  I used the following command to compile the c++ file:
>  gcc -o ping ping.cc

Use g++ and not gcc to compile C++ code. Or at least, add the arguments
that tell gcc that it is compiling C++ code.

>  I got the following messages:
>  agent.h: No such file or directory
>  tcltc.h: No such file or directory
>  packet.h: No such file or directory
>  ....
>  
>  How can I link these header files in NS directories?

Where are they installed ? Let's say there is an $NS2/include directory
=> g++ -I$NS2/include -o ping ping.cpp

Anyway, these questions are not relative to cygwin, but to GCC and other
*nix command-line compilers.
=> 
- man gcc
- find a tutorial about makefiles, compiling under unices, etc...


HTH,
-- 
Luc Hermitte

--
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