This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: mingw32, winsock.h and g++ - problem


In article <Pine.GSO.3.96.990831185737.14091O-100000@petunia.ce.chalmers.se>,
Robert Feldt  <feldt@ce.chalmers.se> wrote:
>
>Hi,
>
>I'm trying to compile and link a C++-program using winsock.h with the
>mingw32 headers and libs and gcc 2.95 (assembled by Mumit Khan).
>Compilation is fine but there seems to be a problem with the name mangling
>during linking:

[ Posted and copied to Robert Feldt  <feldt@ce.chalmers.se> ]

This is a known problem (sure, now I tell you ;-). Please visit 
  http://www/~khan/software/gnu-win32/gcc.html#gcc295-fixes
to see others like this.

Some of the w32api include files (all the win*.h files) are missing
the ``extern "C"'' wrapper. ie., you need to wrap winsock.h in the
following wrapper.
  
  #ifdef __cplusplus
  extern "C" {
  #endif

  /* file here. */

  #ifdef __cplusplus
  }
  #endif

Regards,
Mumit


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]