26

Re: libevent: how it to the project under Windows?

27

Re: libevent: how it to the project under Windows?

It is necessary  MSVS? If is not present - under   MSYS2, and all will be as simply, as in .

28

Re: libevent: how it to the project under Windows?

Hello, niXman, you wrote: X> it is necessary  MSVS? X> if is not present - under   MSYS2, and all will be as simply, as in . Yes, it is necessary MSVC

29

Re: libevent: how it to the project under Windows?

Hello, SteeLHeaD, you wrote: SLH> Yes, it is necessary MSVC I do not envy...

30

Re: libevent: how it to the project under Windows?

Hello, SteeLHeaD, you wrote: SLH> Now the program gathers and launched, SLH> the error at start changed: SLH> SLH> C:\MyProjects\Cpp\LibeEx1\Debug>LibeEx1.exe SLH> [warn] evsig_init_: socketpair: Either the application has not called WSAStartup, or WSAStartup failed. SLH> Libevent initialised! SLH> [warn] socket: Either the application has not called WSAStartup, or WSAStartup failed. SLH> Failed to init http server. SLH> Well, that WinSock is not initialized is actually similar. Esteem about WSAStartup https://msdn.microsoft.com/ru-ru/librar … p/ms742213 (v=vs.85).aspx

31

Re: libevent: how it to the project under Windows?

MD> Well, that WinSock is not initialized is actually similar. Esteem about WSAStartup MD> https://msdn.microsoft.com/ru-ru/librar … p/ms742213 (v=vs.85).aspx Took a manual from here citforum.ru/book/cook/winsock.shtml Tried, but the error did not change. I think what to pull  hands from my program - not the decision, after all the library which I try  to the project should "pull" it. To it 2 already on any should be , differently it would not gather. I transited in  till that line in which the program cannot create a socket. On a picture it is visible, what values had variables during the moment when the socket could not form. Look, can, in what that clear put?

32

Re: libevent: how it to the project under Windows?

Hello, SteeLHeaD, you wrote: SLH> also produces  about error SLH> SLH> C:\MyProjects\Cpp\LibeEx1\Debug>LibeEx1.exe SLH> [warn] evsig_init_: socketpair: Either the application has not called WSAStartup, or WSAStartup failed. SLH> Libevent initialised! SLH> [warn] socket: Either the application has not called WSAStartup, or WSAStartup failed. SLH> Failed to init http server. SLH> And if violently to cause WSAStartup #include <winsock2.h> #include <ws2tcpip.h> int net_init () {WSADATA data; return WSAStartup (MAKEWORD (2,2), &data);} void net_done () {WSACleanup ();}

33

Re: libevent: how it to the project under Windows?

https://github.com/libevent/libevent/bl … ver.c#L339 there even examples are well throw you it, what for itself to force if cannot understand the library?

34

Re: libevent: how it to the project under Windows?

Hello, reversecode, you wrote: R> https://github.com/libevent/libevent/bl … ver.c#L339 R> there even examples are R> well throw you it, what for itself to force if cannot understand the library? Examples what, for VS? That, on what you gave the reference - what for  in the best style - through forgive My God ifdef', and in addition - on Si. I, if I will want to read such example, I will not have desire to admire on  artifacts as VS cannot make the project assembly under  (and under what of their set, by the way?) with little effort. dirlen = strlen (whole_path); pattern = malloc (dirlen+3); memcpy (pattern, whole_path, dirlen); there were years, bearded  continued to write the code for stack and heap failure.

35

Re: libevent: how it to the project under Windows?

Hello, reversecode, you wrote: R> R> https://github.com/libevent/libevent/bl … ver.c#L339 R> there even examples are R> well throw you it, what for itself to force if cannot understand the library? Examples everywhere . I told - at rumpling on  it earned for 15 minutes But to be debugged to me it is necessary under Windows. If, of course, MS And further will be same opened and modern - it is possible, there will be "a studio" version under  but while it is not present. And even to contact  debugging techniques under  from under type Windows https://habrahabr.ru/company/microsoft/blog/319962/ to me not so it would be desirable. And what for to me to understand library? I should cause it correctly, and all. As it is arranged HTTP - I know. The piece which allows me to pull far off a server part through a network is necessary to me . Then to me it will be necessary json - a parcer. And everything, the stack of technologies for operation - is ready. Never simply I on a C ++ launched this stack. And here you, at all your experience, cannot prompt to me that it is necessary to make, that the project gathered and earned.

36

Re: libevent: how it to the project under Windows?

To me what claims? These are official examples libevent that as THEY use it, i.e. I prompt, any Init functions which should initialize WSA* at them are not present and before to undertake for what that , it is necessary to read and look the documentation and examples, it for this purpose and are written instead of to be engaged in guesses

37

Re: libevent: how it to the project under Windows?

In cmake there is a record about examples so these examples and under studio gather so send far away that who you to it forced let it does

38

Re: libevent: how it to the project under Windows?

39

Re: libevent: how it to the project under Windows?

R> to me what claims? These are official examples libevent R> that as THEY use it, i.e. I prompt, any Init functions which should initialize WSA* at them are not present R> and before to undertake for what that , it is necessary to read and look the documentation and examples, it for this purpose and are written R> instead of to be engaged in guesses At me there are no to you claims. But I read the documentation. Was specific - I read here it: the manual on libevent in Russian In a manual to me all is clear. But there anywhere there is no head "what ticks to deliver in a development environment of a Visual Studio 2015 that earned at least hello world". Therefore also it is necessary to be engaged in guesses.

40

Re: libevent: how it to the project under Windows?

This was necessary for what purposes for you ? Can be eat something another, easier, probably, even, hider-onli...

41

Re: libevent: how it to the project under Windows?

Hello, niXman, you wrote: X> this was necessary for what purposes for you ? Can be eat something another, easier, probably, even, hider-onli... And yes. Yet clearly, than to you does not approach MSYS2?

42

Re: libevent: how it to the project under Windows?

Hello, SteeLHeaD, you wrote: SLH> In advance thanks for councils. Questions from which depend answers: 1. To you OpenSSL it is necessary or not? 2. Statically you want  or dynamic? 3.  static or dynamic? 4. For x84 or x64? And still, you in course, what on all pictures you changed adjustments only for configuration Debug?

43

Re: libevent: how it to the project under Windows?

Hello, SteeLHeaD, you wrote: SLH> Hello, reversecode, you wrote: R>> R>> https://github.com/libevent/libevent/bl … ver.c#L339 R>> there even examples are R>> well throw you it, what for itself to force if cannot understand the library? SLH> examples everywhere . SLH> I told - at rumpling on  it earned for 15 minutes SLH> But to be debugged to me it is necessary under Windows. Well use subsystem Linux on Windows, and do too most that did and on Linux. SLH> If, of course, MS And further will be same opened and modern - it is possible, there will be "a studio" version under  but while it is not present. SLH> And even to contact  debugging techniques under  from under Windows of type SLH> https://habrahabr.ru/company/microsoft/blog/319962/ SLH> to me not so it would be desirable. Deliver CLion on Linux, it will be more friendly"visual studio, and be debugged in it.

44

Re: libevent: how it to the project under Windows?

Hello, MTD, you wrote: MTD> Hello, SteeLHeaD, you wrote: SLH>> In advance thanks for councils. MTD> questions from which depend answers: MTD> 1. To you OpenSSL it is necessary or not? MTD> 2. Statically you want  or dynamic? MTD> 3.  static or dynamic? MTD> 4. For x84 or x64? MTD> And still, you in course, what on all pictures you changed adjustments only for configuration Debug? 1. It is necessary. But, as I am not able read thought I can not  to learn, in what value to install variable OPENSSL_CRYPTO_LIBRARY - likely, it is necessary to go to read  - a file. While - I found a method to collect library without OpenSSL 2. I want statically, but any  on this subject did not find. I  do not understand, whether it is possible to collect this library statically. Not that that statically with it . While - I simply shower DLL - ,  it , in the same folder where lies EXE. 3. Did not understand a question. I so understand that it directly follows from the answer number two. If I am not right - where to me about it to read? (For certain there is what that the special chapter in  - .) 4. For x64. But I generally that got out. In a forum on cyberforum.ru me gave such very useful  - an example hello world, in  really under Windows it is necessary to launch hands . Here how many years on  under Windows stumble - and each time for new a place! The help sounded so: "Look an example libevent/sample/hello-world.c - it is necessary to cause." It is exact... Yes, began to compare, and in  found, in what place in one case initialization happens, and in other - does not happen. It appeared that under  REALLY it is necessary main to write at the very beginning of function #ifdef _WIN32 WSADATA wsa_data; WSAStartup (0x0201, &wsa_data); #endif As they say, never was, and here again! No, it never bothers!

45

Re: libevent: how it to the project under Windows?

Hello, SteeLHeaD, you wrote: SLH> As they say, never was, and here again! Judging by a flow of thoughts the help helps you exactly one - to take and most all to make, parallely explaining basis, but it strongly is beyond one message. Therefore exhale also do nothing week, then start to read about compile processes and , fully, slowly. In a month all you will collect, but already with understanding of processes.

46

Re: libevent: how it to the project under Windows?

Hello, SteeLHeaD, you wrote: SLH> I do not have to you claims. SLH> but I read the documentation. SLH> it is is specific - I read here it: SLH> a manual on libevent in Russian SLH> In a manual to me all is clear. SLH> but there anywhere there is no head "what ticks to deliver in a development environment of a Visual Studio 2015 that earned at least hello world". SLH> Therefore also it is necessary to be engaged in guesses. Gym-gym. Move you from the country pink  in our Mordor  If everyone  was engaged in that at first initialized all subsystems these authors  very quickly would relieve of heresy in the best traditions of a XVII-th century. Understand, libevent only library (it not Frejmvork which lifetime is always equal to program lifetime). Therefore Libevent no concept has, whether has been initialized WinSock at the moment of its loading, whether it is necessary it  on library outswapping, etc. Besides, on each platform the nuances can be added - look at source codes of the same pjSIP for interest, there it is real  .

47

Re: libevent: how it to the project under Windows?

https://github.com/Microsoft/vcpkg there is you , it is possible to collect x86, x64 and for them statics

48

Re: libevent: how it to the project under Windows?

Hello, Dambo, you wrote: D> https://github.com/Microsoft/vcpkg D> there is you , it is possible to collect x86, x64 and for them Thanks statics. It is interesting. And as that I there did not guess to look, though itself arises. Thanks for !

49

Re: libevent: how it to the project under Windows?

Hello, MTD, you wrote: MTD> Hello, SteeLHeaD, you wrote: SLH>> As they say, never was, and here again! MTD> Judging by a flow of thoughts the help helps you exactly one - to take and most all to make, parallely explaining basis, but it strongly is beyond one message. Therefore exhale also do nothing week, then start to read about compile processes and , fully, slowly. In a month all you will collect, but already with understanding of processes. Yes, thanks, are a piece of good advice.

50

Re: libevent: how it to the project under Windows?

Look here: the link