From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,48b795543045597c X-Google-Attributes: gidfee84,public From: Rob Urban Subject: Re: compiling with Digital C Date: 1999/07/11 Message-ID: <3787F9D7.A557D687@spielwiese.de>#1/1 X-Deja-AN: 499748327 Content-Transfer-Encoding: 7bit References: <37813B0E.B661C3E1@hotmail.com> X-Accept-Language: en, German, de Content-Type: text/plain; charset=us-ascii Organization: ECRC Mime-Version: 1.0 Newsgroups: comp.unix.osf.osf1 ijkdc@hotmail.com wrote: > > Hello, > I'm trying to compile a C program with Digital C. Unfortunately I > didn't write the program which will make it harder to debug and the > author doesn't seem to have any experience with non-GNU compilers. The > program compiles fine on my Linux box with gcc but has trouble with > Digital C on OSF/1. I get the following error: > > cc: Error: line 299: In this declaration, "sin" has no > linkage and is of an incomplete type. > struct sockaddr_in sin; /* used to store inet addr stuff */ > ---------------------------^ > > I don't really understand the error message and I've never declared a > struct like that. I would have to agree that it's an incomplete type, > but gcc doesn't seem to mind it. Could someone shed some light on this > situation please? The error message indicates that the definition of 'struct sockaddr_in' is missing. You probably need to '#include '. When trying to solve such problems, there's a foolproof way of getting to the bottom of things. Use the compiler flags -source_listing -show all along with regular parameters. The (pre-)compiler will write a .lis output file which you can open with an editor. Simply look for the first occurance of the symbol in question. I suspect in this case the first occurance will be in the source module 'icq_response.c', which means 'struct sockaddr_in' never gets defined. cheers, Rob