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

Re: can any linux programmers help with this error?



Mike K. wrote:

Here is an error I get from compiling a program under g++ that I am working
on that deals with sockets.  I've been staring at it for a while now and
can't figure out how I have anything to do with this problem.  From what I
see, it appears that two declarations of the same function are conflicting
because they are only different in their exception specification or maybe
even the syntax of how the exception specification is declared??  Any help
would be greatly appreciated!!

And by the way, as you can see these header files aren't ones I created.
They belong to Linux.  So the fact that they are giving me errors is
baffling me.

In file included from /usr/include/linux/byteorder/little_endian.h:67,
                 from /usr/include/asm/byteorder.h:39,
                 from /usr/include/linux/tcp.h:22,
                 from SocketObjectLNX.h:12,
                 from SocketObjectLNX.cpp:2:
/usr/include/linux/byteorder/generic.h:150: declaration of `unsigned int
ntohl (unsigned int)' throws
different exceptions
/usr/include/netinet/in.h:236: than previous declaration `unsigned int
ntohl (unsigned int) throw ()'


Uh, why are you including those?  You should only need to include
/usr/include/netinet/in.h.  That header should include what it
needs.  The compiler sets up macros for which-endian the local
processor is.

The purpose of ntohl() and its ilk is to translate between native
byte-order (Intel = little endian, SPARC and Alpha = big endian) and
network byte-order (big endian).

----------------------------------------------------------------------
- Rick Stevens, SSE, VitalStream, Inc.      rstevens vitalstream com -
- 949-743-2010 (Voice)                    http://www.vitalstream.com -
-                                                                    -
-   NEWS FLASH! Intelligence of mankind decreasing!  Details at...   -
-     uh, when, uh, the little hand is, uh, on the...  Aw, NUTS!     -
----------------------------------------------------------------------





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