You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
313 B

  1. 
  2. #include <iostream>
  3. #include<event2/event.h>
  4. int main()
  5. {
  6. #ifdef _WIN32
  7. //初始化socket库
  8. WSADATA wsa;
  9. WSAStartup(MAKEWORD(2, 2), &wsa);
  10. #endif
  11. std::cout << "test libevent!\n";
  12. //创建libevent上下文
  13. event_base* base = event_base_new();
  14. if (base) {
  15. std::cout << "yes";
  16. }
  17. return 0;
  18. }