Troubles compiling samples on VC++ 6 SP5
[email protected] Mon, 10 May 2004 11:12:01 +0200
| Newsgroups | gmane.comp.security.libnet |
|---|---|
| Message-ID | <[email protected]> |
Hi all, I am trying to compile the samples in the latest stable libnet version, more specifically the icmp timestamp sample. When trying to do so, I can compile just fine, but I get linking errors. And I don't know how to solve those, any help would be greatly appreciated. What I have done so far is install VC++ sp5; install the winpcap development library; install the 2003 platform SDK and build the libnet.dll & libnet.lib (I had to edit the libnet_prand.c file (the libnet_get_prand function) to make this work, otherwise I got linking errors again). Then I added the necessary folders to the lib & include directories according to the readme.txt in the win32 folder. Finally I added the libnet\include directory to the list of include directories. Now when I try to build the icmp timestamp sample I add the libnet.lib file to the project, and try to built which gives me the following output. --------------------Configuration: icmp_timestamp - Win32 Debug-------------------- Compiling... icmp_timestamp.c Linking... icmp_timestamp.obj : error LNK2001: unresolved external symbol _optarg icmp_timestamp.obj : error LNK2001: unresolved external symbol _getopt Debug/icmp_timestamp.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. icmp_timestamp.exe - 3 error(s), 0 warning(s) Any help would be wonderful. Thanks Kim