PDA

View Full Version : compile error on bsd


misfit
02-20-2002, 06:29 PM
lil box info

FreeBSD 4.5-STABLE FreeBSD 4.5-STABLE #1: Wed Feb 20 11:29:06 EST 2002 usr/obj/usr/src/sys/ i386

the error

bash-2.05a$ make
c++ -O -pipe -c ../common/EQFragment.cpp
c++ -O -pipe -c ../common/EQPacket.cpp
In file included from ../common/EQPacket.cpp:9:
/usr/include/netinet/in.h:233: syntax error before `;'
/usr/include/netinet/in.h:285: syntax error before `;'
In file included from /usr/include/netinet/in.h:467,
from ../common/EQPacket.cpp:9:
/usr/include/netinet6/in6.h:122: syntax error before `['
/usr/include/netinet6/in6.h:144: syntax error before `;'
/usr/include/netinet6/in6.h:149: syntax error before `;'
/usr/include/netinet6/in6.h:612: syntax error before `*'
/usr/include/netinet6/in6.h:614: syntax error before `*'
/usr/include/netinet6/in6.h:615: syntax error before `*'
/usr/include/netinet6/in6.h:616: syntax error before `*'
/usr/include/netinet6/in6.h:631: type specifier omitted for parameter
/usr/include/netinet6/in6.h:632: type specifier omitted for parameter
/usr/include/netinet6/in6.h:636: syntax error before `*'
/usr/include/netinet6/in6.h:638: type specifier omitted for parameter
../common/EQPacket.cpp: In function `static int32 CEQPacket::GenerateCRC(unsigned int, unsigned int, uchar *)':
../common/EQPacket.cpp:91: implicit declaration of function `int htonl(...)'
../common/EQPacket.cpp: In method `void CEQPacket::DecodePacket(short unsigned int, uchar *)':
../common/EQPacket.cpp:132: implicit declaration of function `int ntohs(...)'
*** Error code 1

theCoder
02-21-2002, 06:44 AM
I don't have a BSD install that I can check, but there's something probably not right with the files being included. The relevant lines in EQPacket.cpp are:

#include <iostream.h>
#ifndef WIN32
#include <netinet/in.h>
#else

with line 9 actually being the #else statement (so maybe it's giving the line right after the include?).

Check the in.h file to see if there's anything obvious that the compiler might not like.

Have you also tried using the gcc compiler instead (I don't think that would make a difference, but you never know).