6 years, 12 months ago.

invalid redeclaration type of name "Socket"- wiznet_library

Hello During compilation i get this message:

Error: Invalid redeclaration of type name "Socket" (declared at <a href="#" onmousedown="mbed_doc_goto('/rmsens2-v011extras/mbed-os.lib/features/netsocket/Socket.h', '32'); return false;">/extras/mbed-os.lib/features/netsocket/Socket.h:32</a>) in "WIZnet_Library/WIZnetInterface/Socket/Socket.h", Line: 30, Col: 8

How can I fix it?

Question relating to:

WIZnet is a fabless semiconductor company specializing in Hardware TCP/IP Ethernet controller and SoC, with high performance and low cost solution.

I'm in trouble with the same problem.

posted by Jay Kim 02 May 2017

To be able to help. Can you provide further details - the revision of mbed-os ? Or any other dependency in your application? Is this a question for mbed 2 or mbed-os ? What application are you building?

How can we reproduce this problem?

posted by Martin Kojtal 02 May 2017

I don't know how to check revision of mbed-os but I think it was 5. I use FRDM-KL43Z board I've created new empty program, next I manually imported library mbed and mbed-rtos (I think it is revision 2) and copied my main.c file and library for w5500. That is work fine.

posted by Tadeusz Studnik 06 May 2017

1 Answer

6 years, 8 months ago.

Disable netsocket feature in mbed, then the build will be successful. Would be helpful to know if Wiznet is going to support the netsocket lirary of latest mbed rather than having its own.

  1. if MBED_CONF_NSAPI_PRESENT
  2. include "netsocket/nsapi.h"
  3. include "netsocket/nsapi_ppp.h"
  4. endif

Above lines of code is present in mbed.h file, disable the macro MBED_CONF_NSAPI_PRESENT so that it doesnt include nsapi files in the mbed.h

posted by satish chandra 08 Aug 2017