Hi,
Can you help me rebuild NDK_2_20 winapps test program? I want to rewrite the example for send raw ethernet packets.
In XDC script for this folder not contained.
Thanks.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
Can you help me rebuild NDK_2_20 winapps test program? I want to rewrite the example for send raw ethernet packets.
In XDC script for this folder not contained.
Thanks.
Nikolay,
We do not have XDC build scripts for the winapps, however there is a batch file present in the winapps directory - "m.bat" - which should help you build it. The batch file is assuming that you have Microsoft Visual Studio .NET 2003 installed, so you would need that or some equivalent compiler to build the executable.
Steve
See the m.bat file in the winapps directory:
REM "c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars32.bat"
cl echoc.c wsock32.lib
cl send.c wsock32.lib
cl recv.c wsock32.lib
cl testudp.c wsock32.lib
cl helloWorld.c wsock32.lib
cl sndpkt.c wsock32.lib
You could also use the MinGW gcc compiler:
gcc echoc.c -lwsock32
Mark
Hi Mark,
Excellent answer! I used the VS 2010 compiler, all working.
I have one question, when compiling source files I obtained warning message (for several source files), for example:
echoc.c(88) : warning C4133: 'function' : incompatible types - from 'sockaddr_in *' to 'const sockaddr *'
Thanks
Nikolay,
Yes, these examples are missing a cast: (const sockaddr *). I'll file a bug to fix this. You can read about why this is a safe cast here:
http://www.retran.com/beej/sockaddr_inman.html
Mark
Hi,
Ok, this is not critical bug.
For sending raw from win host may be useful to someone. See attached file (for rebuild you must have a WinPcap Developer's Pack, and WinPcap Installer for running it)
Thanks