Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

LwIP and .CPP file extension

Altera_Forum
Honored Contributor II
1,158 Views

Hi Everyone! 

 

I got working LwIP using NIOSII and QUARTUSII 5.1 (I don&#39;t get working with QUARTUSII and NIOSII 6.0 http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/sad.gif ) like especified in this site. 

Now I got another problem: when everithing works fine, I changed the file extension of lwip_web_server_0.c to lwip_web_server_0.cpp and I got a lot of erros, most of them related to typecast. 

 

I would like to know if anyone get it working. All paths are correct and highlighting I say that everything works when using standard configuration. 

There is someone?  

 

Best regards, 

Nosima
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
433 Views

There is a list of some errors founded... 

 

*** [Core_Final.elf] Error 1 Core_Final 

 

obj/apps/base.o *../apps/echo.cpp:222: undefined reference to `tcp_accept(tcp_pcb*, signed char (*)(void*, tcp_pcb*, signed char))&#39; In function `con_erro&#39;: 

 

obj/apps/base.o *../apps/base.cpp:314: undefined reference to `tcp_sent(tcp_pcb*, signed char (*)(void*, tcp_pcb*, unsigned short))&#39; 

../apps/base.cpp:315: undefined reference to `tcp_recv(tcp_pcb*, signed char (*)(void*, tcp_pcb*, pbuf*, signed char))&#39; 

 

obj/apps/base.o *../apps/base.cpp:315: undefined reference to `tcp_recv(tcp_pcb*, signed char (*)(void*, tcp_pcb*, pbuf*, signed char))&#39; 

../apps/base.cpp:316: undefined reference to `mem_free(void*)&#39; 

 

obj/apps/base.o *../apps/base.cpp:316: undefined reference to `mem_free(void*)&#39; 

../apps/base.cpp:317: undefined reference to `tcp_close(tcp_pcb*)&#39;  

 

obj/apps/base.o *../apps/base.cpp:317: undefined reference to `tcp_close 

 

 

 

Best Regards, 

Nosima
0 Kudos
Altera_Forum
Honored Contributor II
433 Views

Hi Nosima, 

 

I dont knw about your first problem.Means why it is not running on Q6.0 and NIOS II 6.0.  

But i can say something about your second error. First thing i would like to say that, how much u are familiar with C and C++. If any file having a extension like *.c then it compile like its rule and if any file having an extension *.cpp the ni will compile with its rule. Now there is somespecific method for accessing *.C file as a *.cpp and *.cpp file as *.c. 

I hope u will get some light on this using my post.. 

i am also sending you one link: 

get a closer look on this.. 

 

http://developers.sun.com/prodtech/cc/articles/mixing.html (http://developers.sun.com/prodtech/cc/articles/mixing.html

 

Best Regards, 

slsnios
0 Kudos
Reply