0

I have this include in my code

#include<event.h>

which is supposed to include the libevent's header file event.h. But when I see the list of included files it includes this header file

Note: including file: C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\event.h

How do I tell the msvc compiler to load libevents event.h header file ? . Thanks

Vihaan Verma
  • 12,815
  • 19
  • 97
  • 126

2 Answers2

2

Try to use #include "event.h". It is for user headers and tells the compiler to first look for the header in user-defined paths.

When you use <> the compiler will first search in system folders.

Luchian Grigore
  • 253,575
  • 64
  • 457
  • 625
Danil Speransky
  • 29,891
  • 5
  • 68
  • 79
2

If you're using libevent version 2, it is probably best to update the includes (look at the table). The new include files don't suffer from this specific issue.

Michał Górny
  • 18,713
  • 5
  • 53
  • 76