Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

LwIP and .CPP file extension

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

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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