UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor nekips
Visitor
7,288 Views
Registered: ‎08-23-2007

SDK and LWIP

In C++ under SDK 9.2 SP2 (using xilkernel 3.00.a and lwip 2.00.a) with the xilkernel and lwip4 library,
I've got a compilation problem with the xilinx web server code example.


The lwip function "lwip_init()" seems to be unavailable.
The compiler give me the following error :

error: 'lwip_init' was not declared in this scope

All of the others functions compile.
Please note that everything works fine under EDK with the SAME plateform settings options.

Any idea ?

Thanks.


Message Edited by nekips on 01-22-2008 10:44 AM

Message Edited by nekips on 01-22-2008 10:53 AM
0 Kudos
3 Replies
Visitor nekips
Visitor
7,247 Views
Registered: ‎08-23-2007

Re: SDK and LWIP

I've found the solution, it only happend when your code is in C++.
 
To build successfully :

#if defined(__cplusplus)
extern "C"
{
    #endif

    #include "netif/xemacliteif.h"
    extern int lwip_init ();

    #if defined(__cplusplus)
}
#endif
0 Kudos
Xilinx Employee
Xilinx Employee
7,228 Views
Registered: ‎01-18-2008

Re: SDK and LWIP

also, note that lwip-1.2.0 itself cannot be compiled with C++. The next release of lwIP supports C++ compilation, so until then you have to use C (or manually wrap everything with extern C similar to your solution).
0 Kudos
Visitor srojas
Visitor
157 Views
Registered: ‎05-20-2019

Re: SDK and LWIP

Hi,

just as an supplement to the answer from @nekips, I wanted to add that you should make sure that the lwip library is linked. Check for the following flags:

Right Click project in Project Explorer, choose C/C++ Settings->C/C++ General->Paths and Symbols->Libraries includes

   -Wl,--start-group,-lxil,-llwip4,-lgcc,-lc,--end-group

For more details see the answer of @schmidtf in

https://forums.xilinx.com/t5/Embedded-Development-Tools/How-to-transfer-data-from-PC-to-board-using-LWIP/td-p/257254

 

0 Kudos