delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/01/19/11:53:58

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Date: Wed, 19 Jan 2005 11:44:33 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: CV <or254498 AT hotmail DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: FileRunner under cygwin - simple compilation fails.
In-Reply-To: <loom.20050119T140548-969@post.gmane.org>
Message-ID: <Pine.GSO.4.61.0501191137150.17795@slinky.cs.nyu.edu>
References: <loom DOT 20050118T142731-507 AT post DOT gmane DOT org> <Pine DOT GSO DOT 4 DOT 61 DOT 0501181010110 DOT 1614 AT slinky DOT cs DOT nyu DOT edu> <loom DOT 20050118T181653-835 AT post DOT gmane DOT org> <Pine DOT GSO DOT 4 DOT 61 DOT 0501181238270 DOT 2596 AT slinky DOT cs DOT nyu DOT edu> <loom DOT 20050119T002537-61 AT post DOT gmane DOT org> <Pine DOT GSO DOT 4 DOT 61 DOT 0501181952340 DOT 9964 AT slinky DOT cs DOT nyu DOT edu> <loom DOT 20050119T140548-969 AT post DOT gmane DOT org>
MIME-Version: 1.0

On Wed, 19 Jan 2005, CV wrote:

> Igor Pechtchanski <pechtcha <at> cs.nyu.edu> writes:
> > On Wed, 19 Jan 2005, CV wrote:
> > > After running the command "gcc -E ext.c -o ext.pre" and then
> > > comparing ext.pre with tcl.h I think I can identify some of
> > > the included bits, eg. the following:
> >
> > You could also just look at the '# line' lines, e.g.,
> > '# 159 "/usr/include/tcl.h" 3 4'
>
> Yep, those lines are in there. Quite a number of them in fact.

Ok, looks like it was included, so that's that.

> > The most interesting thing is whether Tcl_CreateCommand is declared, and
> > whether its signature corresponds to its usage in ext.c.
>
> Here are the relevant bits.
> I'm afraid I am not conversant enough with pointer and data type
> mechanisms in c to make total sense of it. It appears to be fairly
> advanced stuff ...

Arg #3 is a pointer to a function (Tcl_CmdProc).  See where that's
declared *in the preprocessed file* (so that all macros are expanded) and
see if your declarations of GetTimeFromSecs, etc, correspond to it.  The
most obvious mismatch is probably the "const char* argv[]" vs. your "char*
argv[]".

> [snip]
> But it would be useful to eliminate the doubt about
> these warnings first. If you can see any obvious mistake
> below I'd appreciate it.
>
> ------------------------------ usage in ext.c ---------------------------
> ... (declarations at the top of the file)
> static int GetTimeFromSecs(ClientData clientData, Tcl_Interp* interp,
>                            int argc, char* argv[]);
> [snip]
> ... (a little further down)
> int
> Ext_Init(interp)
>     Tcl_Interp *interp;		/* Interpreter for application. */
> {
>     Tcl_CreateCommand(interp, "GetTimeFromSecs", GetTimeFromSecs, NULL, NULL);
> [snip]
> ...
> --------------------------------------------------------------------------
> -------- and, again, the warnings from the compilation -------------------
>
> gcc -Wall -fPIC -O3 -I/usr/include -I/usr/include -I/usr/include/X11
>    -c -o ext.o ext.c
> cc1: warning: -fPIC ignored for target (all code is position independent)
> ext.c: In function `Ext_Init':
> ext.c:95: warning: passing arg 3 of `Tcl_CreateCommand' from
>   incompatible pointer type
> [snip]
> ...
> --------------------------------------------------------------------------
>
> > > Don't know, but actually it only refuses to enter the
> > > C:/cygwin/cygdrive directory, where the windows disks
> > > are mounted. It is ok everywhere else.
> >
> > Ha.  /cygdrive is a virtual directory, intended to access Windows
> > disks from inside Cygwin, not vice versa.  Why go to
> > C:/cygwin/cygdrive/c/, when you can simply go to C:/?
>
> I would have preferred to have a consistent view of the
> directory tree from within cygwin, starting from "/" as
> the root, but as I say it's a minor point.

If you want to see /cygdrive as a real directory, create it ("mkdir
/cygdrive" should do it).  However, any *Cygwin* program will interpret
"/" as "c:/cygwin", and not as "c:/", unless your mounts are screwed up
(which they don't seem to be).
HTH,
	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!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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