Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Using pcap, dirent.h and error C2085, C2061

hjazzhjazz Member Posts: 2
Hi all,

I'm new to using Visual Studio. I'm currently using VS .NET 2003 on Vista, and I'm trying to port a program from Linux to Windows.

The program uses the pcap library. I have installed WinPcap 4.0.2 and downloaded the Developer's Pack WpdPack_4_0_2. However, I have no idea what to do with the developer's pack, i.e. what do I do with the pcap.h and other header files/libraries so my program can use the pcap functions.

Also, one of the errors I've gotten was that the file dirent.h cannot be found. Is there some way to workaround this problem, i.e. some library that I can download and use so I don't have to change my code? If not, what are the alternatives?

Lastly, I seem to get a lot of syntax errors. The program was able to compile and run without errors in Linux. One of these errors are "error C2085: '': not in formal parameter list." These errors occur in the header file which is in the following format:

[code]#ifndef HEADER_H
#define HEADER_H

/* Bunch of #include and #define statements */
/* Struct declarations */

/* Here's where the errors are */
static void *Function1(int n);
int Function2(ABC *x); //ABC is a self-defined structure declared in this header file
ABC *Function3(void *a);
static inline void Function4(unsigned char *c, unsigned char *d, int e);

/* There is also a C2061: syntax error: identifier 'inline' for the
following line */
inline int Function5(ABC *x, unsigned char *f, int g);


Please advise.

Thank you.

Sign In or Register to comment.