- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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, SubbuLink Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok Can I get a client program for the nios2. The demo which altera gave is server.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The BSD socket is widely documented. For example you can find here (http://en.wikipedia.org/wiki/bsd_socket) examples for both servers and clients, on both UDP and TCP.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page