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 X-Originating-IP: [202.7.175.93] From: "Gareth Pearce" To: "Uwe Mayer" , References: <1901490873 DOT 20021118091913 AT hadiko DOT de> Subject: Re: compiling clicq, problems with c++ Date: Mon, 18 Nov 2002 20:12:52 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: X-OriginalArrivalTime: 18 Nov 2002 09:12:31.0621 (UTC) FILETIME=[9FE62B50:01C28EE2] > Hi, > > I was trying to compile clicq, an icq client for linux, for cygwin. > However I'm a little new to C++ although not to programming in > general. Here is what I got problems with: > > 1. during make, gcc reported that the definition for AF_INET was > missing. since I knew it was located in socket.h I located it and > simply added an #include line. > How can it be that such a thing is missing in sources you download > from the web? > There were multiple socket.h files. I chose one which was located in a > */cygwin/* path. Why different header files? > if you look at the actual contents of those files - they include each other the standard method of including socket.h is #define > This problem seems to be solved. > > > 2. make (or rather gcc) reports a number of problems like: > > In file included from clicq.c:23: > cfg.h:14:8: warning: extra tokens at end of #endif directive > > Although I'm sure there are no more characters after the #endif > directive. Whats going on here? an old common thing to do was to put comments after #endif directives this isnt strictly legal - so new gcc versions warn about it. > > Since its only a warning I ignored those. yeah probably no harm > > > 3. however, make still doesn't run through: > > clicq.c: In function `main': > clicq.c:267: warning: assignment from incompatible pointer type > clicq.c:268: warning: assignment from incompatible pointer type > make[2]: *** [clicq.o] Error 1 > make[2]: Leaving directory `/tmp/clicq-0.1/src' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/tmp/clicq-0.1' > make: *** [all-recursive-am] Error 2 > > First point: why is line 267 not causing make to abord, but line 268 > if both are "warning"s of the same type? first point - a given line of output doesnt cause make to abort - its when a program returns with a return code indicating error that make aborts. second point - Gcc will continue after it finds errors - and try to report as much as possible. you've only given the last 3 lines which are both warnings. - you havent given the command invoked so we dont know if -Werror has been passed. And theres no way to know whats between the command and the first of the lines you have stated. Not enough context. third and final point > > Here's the contents of those lines: > > 267: > rl_completion_entry_function = (Function*)&dummy_completer; > rl_attempted_completion_function = &my_completer; > > where dummy_completer: > char *dummy_completer(char *text, int state) { > return (char*)NULL; > } > > and my_completer: > char **my_completer(char *text, int start, int end) { > return complete_commandarg(rl_line_buffer, text, start, end); > } > > I couldn't find the declaration of rl_completion_entry_function and > rl_attempted_completion_function. Are there any Tricks to find these? They are probably in header files which have been included. Since you say this is c++ - they are probably members of a class which is defined in a header. but its not an issue probably. Gareth -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/