|
|
-
- #include <iostream>
- #include<event2/event.h>
-
- int main()
- {
- #ifdef _WIN32
- //初始化socket库
- WSADATA wsa;
- WSAStartup(MAKEWORD(2, 2), &wsa);
- #endif
- std::cout << "test libevent!\n";
-
- //创建libevent上下文
- event_base* base = event_base_new();
- if (base) {
- std::cout << "yes";
- }
-
- return 0;
- }
-
-
|