Forum Discussion

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

Issue in Simple Client in Nios2

Hi,

I am having the simple client in nios2 program which is using the winsock2.h header.

Have included the all w32api files to the project. ( Attached is the client program).

When I try to compile it, its showing me an error in winnt.h and winbase.h files. Below are the error:

/client_bsp/winnt.h:2350:2: error:# error "undefined processor type"

In file included from ../client_bsp/windef.h:253,

from ../client_bsp/windows.h:48,

from ../client_bsp/winsock2.h:22,

from hello_world.c:2:

../client_bsp/winnt.h:2352: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token

../client_bsp/winnt.h:2363: error: expected specifier-qualifier-list before 'PCONTEXT'

I believe, I might be missing some files hence the error.

Could you please assist me in this.

Thanks,

Subbu

3 Replies

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

    You can't use winsock or win32 API on a Nios 2 application, they are only available on Windows. You should use standard BSD sockets instead.

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

    Ok Can I get a client program for the nios2. The demo which altera gave is server.