This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Problem when compiling c++ using gcc
- From: Luc Hermitte <hermitte at free dot fr>
- To: Feng Y <feng6 at uwindsor dot ca>
- Cc: cygwin at cygwin dot com
- Date: Sun, 21 Mar 2004 01:40:57 +0100
- Subject: Re: Problem when compiling c++ using gcc
- References: <1079696928.10718.ezmlm@cygwin.com> <web-38801349@uwindsor.ca>
Hello,
* On Sat, Mar 20, 2004 at 03:46:34AM -0500, Feng Y <feng6@uwindsor.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/