delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/03/03/11:54:03

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
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Wed, 3 Mar 2004 11:53:41 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Andrew Sasak <sasakand2 AT hotmail DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: weird compile command issues
In-Reply-To: <BAY9-F17Ug0aNL8CkQK0003dd31@hotmail.com>
Message-ID: <Pine.GSO.4.56.0403031146271.17984@slinky.cs.nyu.edu>
References: <BAY9-F17Ug0aNL8CkQK0003dd31 AT hotmail DOT com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

On Wed, 3 Mar 2004, Andrew Sasak wrote:

> I'm using a library I found on sourceforge called tclap. I installed the
> library correctly as far as I know. I have no problems compiling using the
> following command line: g++ -Wno-deprecated -o massflow.exe massflow.cpp
> cycle.cpp datapoint.cpp -L F:\cygwin\usr\local\lib -ltclap
>
> The following command line will compile in a Windows cmd.exe but not in the
> cygwin interface (or using Xemacs): g++ -mno-cygwin -Wno-deprecated -o
> massflow.exe -I %CYGWIN%\usr\local\include massflow.cpp cycle.cpp
> datapoint.cpp -L %CYGWIN%\usr\local\lib -ltclap
>
> I get the following errors:
> massflow.cpp:9:27: tclap/CmdLine.h: No such file or directory
> massflow.cpp:13: error: namespace `TCLAP' undeclared
>
> I've tried reversing the slashes, putting paths in quotes, etc. I would like
> to be able to use Xemacs to compile and use the -mno-cygwin flag so that I
> can distribute my software without the cygwin .dll. I'm guessing there might
> be something simple I'm not seeing. Thanks for your help.

You haven't told us anything about your system.  Please read the Cygwin
problem reporting guidelines at <http://cygwin.com/problems.html> to find
out what information needs to be provided.  However, I can probably make a
few recommendations with what little information you supplied.

It's preferable to use POSIX paths with Cygwin programs (including gcc),
so that the above line should really be something like

g++ -mno-cygwin -Wno-deprecated -o massflow.exe -I /usr/local/include massflow.cpp cycle.cpp datapoint.cpp -L /usr/local/lib -ltclap

If your paths come in from Windows, read up on the "cygpath" utility.
Even if using Win32 paths is unavoidable (and Cygwin programs *will*
understand them most of the time), you should quote the backslashes
properly or use forward slashes.

Finally, the CYGWIN environment variable has special meaning in Cygwin,
and it isn't the Win32 location of the root directory (use `cygpath -w /`
for that).  Also, Cygwin's shells will not understand the %VAR% syntax.

In short, use POSIX paths, don't use $CYGWIN, and you should be ok.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

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