[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: compile error--my choice of options, or the program?



On Thu, Apr 15, 1999 at 22:26:24 -0700, kaynjay@igalaxy.net wrote:
> I'm trying to compile a large program wherein I had to choose a series of
> options for my system (Linux/PC vs. SGI, etc).  The entire output of the
> compile is the following lines:
> 
> g++  -DNDEBUG     -O3    -c -DWRITEPDBQSTATE main.cc
> main.cc:60: declaration of C function `int gethostname(char *, int)'
> conflicts with /usr/include/unistd.h:662: previous declaration `int
> gethostname(char *, size_t)' here make: *** [main.o] Error 1

The main program declares gethostname in some way. Probably by something
like
	extern int gethostname(char * foo, int bar)

Try commenting out that declaration in main.cc.

HTH,
Ray
-- 
LEADERSHIP  A form of self-preservation exhibited by people with auto-
destructive imaginations in order to ensure that when it comes to the crunch 
it'll be someone else's bones which go crack and not their own.       
- The Hipcrime Vocab by Chad C. Mulligan    


Reply to: