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 - Success. Date: Wed, 19 Jan 2005 18:13:07 +0000 (UTC) Lines: 49 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: > > 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[]". OK, this is the definition of Tcl_CmdProc in the preprocessed file: ------------------------------------------------------------------- typedef int (Tcl_CmdProc) (ClientData clientData, Tcl_Interp *interp, int argc, const char *argv[]); And here is GetTimeFromSecs also from the preprocessed file: ------------------------------------------------------------------- static int GetTimeFromSecs(ClientData clientData, Tcl_Interp* interp, int argc, char* argv[]); ... so I changed "char* argv[]" to to "const char *argv[]" at the affected spots in the source code in ext.c. It now compiles and links without warnings and the application (FileRunner) works with the resulting .dll. I can't be certain yet if it also fixed the problem I was having, since it was intermittent. I can see how this change makes the data types agree and gets rid of the warnings. But I am quite baffled as to why this should be declared as a constant !? That argument seems to be a pointer to an array of input arguments to a function. Surely such a pointer would have to change dynamically during execution and no way could it be constant !? Oh well. These comments sort of give away my level of (in)experience I suppose... :o) Another thing is that, seeing what it was all about, I can't imagine that the warnings actually mattered, or made the resulting .dll work differently in any way (?) Can't be sure if I'm through with this yet but your advice saw me through a couple of initial hurdles in style here. Big THANKS, again, for your excellent help ! 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/