Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com From: CV Subject: Re: FileRunner under cygwin - simple compilation fails. Date: Wed, 19 Jan 2005 13:41:19 +0000 (UTC) Lines: 93 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT sea DOT gmane DOT org X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 82.158.81.106 (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)) X-IsSubscribed: yes Igor Pechtchanski 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. > 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 ... And I am seeing strange behaviour in the program, on one particular point, though we best not go into details on that yet as I am not sure it is anything to do with cygwin. 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. ---------- from tclDecls.h, included at pre-compile time ---------------- /* 91 */ EXTERN Tcl_Command Tcl_CreateCommand _ANSI_ARGS_((Tcl_Interp * interp, CONST char * cmdName, Tcl_CmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc)); ... Tcl_Command (*tcl_CreateCommand) _ANSI_ARGS_((Tcl_Interp * interp, CONST char * cmdName, Tcl_CmdProc * proc, ClientData clientData, Tcl_CmdDeleteProc * deleteProc)); /* 91 */ ------------------------------------------------------------------------- ------------------------------ usage in ext.c --------------------------- ... (declarations at the top of the file) static int GetTimeFromSecs(ClientData clientData, Tcl_Interp* interp, int argc, char* argv[]); static int GetTimeFromSecsSetFormat(ClientData clientData, Tcl_Interp* interp, int argc, char* argv[]); static int GetStringFromMode(ClientData clientData, Tcl_Interp* interp, int argc, char* argv[]); static int GetUidGidString(ClientData clientData, Tcl_Interp* interp, int argc, char* argv[]); ... (a little further down) int Ext_Init(interp) Tcl_Interp *interp; /* Interpreter for application. */ { Tcl_CreateCommand(interp, "GetTimeFromSecs", GetTimeFromSecs, NULL, NULL); Tcl_CreateCommand(interp, "GetTimeFromSecsSetFormat", GetTimeFromSecsSetFormat, NULL, NULL); Tcl_CreateCommand(interp, "GetStringFromMode", GetStringFromMode, NULL, NULL); Tcl_CreateCommand(interp, "GetUidGidString", GetUidGidString, NULL, NULL); ... -------------------------------------------------------------------------- -------- 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 ext.c:96: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible pointer type ext.c:97: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible pointer type ext.c:98: warning: passing arg 3 of `Tcl_CreateCommand' from incompatible pointer type ... -------------------------------------------------------------------------- > > 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. Cheers CV -- 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/