RE: Troubles compiling samples on VC++ 6 SP5
[email protected] Mon, 10 May 2004 19:14:47 +0200
| Newsgroups | gmane.comp.security.libnet |
|---|---|
| Message-ID | <[email protected]> |
Thanks Kirby, that did the trick. I should have been able to figure this one out myself didn't I. Oh wel, another leason learned. Kim >-- Original Message -- >Reply-To: <[email protected]> >From: "Kirby Kuehl" <[email protected]> >To: <[email protected]>, <[email protected]> >Date: Mon, 10 May 2004 11:27:51 -0400 >Subject: RE: Troubles compiling samples on VC++ 6 SP5 > > > >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA1 > >#ifdef __WIN32__ >#include "../include/win32/getopt.h" >#endif >And add getopt.c to project from sample\win32 > > > >- -----Original Message----- >From: [email protected] [mailto:[email protected]] >Sent: Monday, May 10, 2004 5:12 AM >To: [email protected] >Subject: Troubles compiling samples on VC++ 6 SP5 > > >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 > > > > >-----BEGIN PGP SIGNATURE----- >Version: PGP 8.0.3 > >iQA/AwUBQJ+fdvJlWu/m+KZxEQKYJACaA1xi+9mNnMibm2DWb7fuQNd1qSkAnRz9 >Jl1mO2MnJ6VlRLRm5yTy6H+H >=Wx1Y >-----END PGP SIGNATURE----- > >