1

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

2

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

Hello, SteeLHeaD, you wrote: SLH> at me a serious and important question over which I fight a head about the keypad more weeks. And libraries ?

3

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

Hello, GhostCoders, you wrote: GC> Hello, SteeLHeaD, you wrote: SLH>> at me a serious and important question over which I fight a head about the keypad more weeks. GC> and libraries ? I mean Linker-> Input-> Additional Dependencies? There the list *.lib files,  , there  event.lib or how there they are called?

4

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

That to sense from library Directory if it is not specified what

5

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

Hello, GhostCoders, you wrote: GC> There the list *.lib files,  , there  event.lib or how there they are called? Try all three : event_core.lib, event_extra.lib, event.lib. Still, I suspect there the preprocessor character it is necessary to install correctly. DLL files any did not form after compilation event? Look in that folder where you event collected, can any DLL were overlooked?

6

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

Hello, reversecode, you wrote: R> that from library Directory if is not specified sense what   And whether it is impossible   to show that, what there buttons to push to specify ?

7

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

Hello, GhostCoders, you wrote: GC> DLL files any did not form after compilation event? Look in that folder where you event collected, can any DLL were overlooked? No, this piece as much as possible  and generally DLL does not create. Anyway, as I understood from descriptions. And DLL - any were not overlooked.

8

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

In  it is full of video, well  give I will look for you https://youtu.be/F4mB2Atu6J4? t=344

9

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

GC>> There the list *.lib files,  , there  event.lib or how there they are called? GC> try all three : event_core.lib, event_extra.lib, event.lib. Tried. An error at start - the same: "--------------------------- LibeEx1.exe - System Error--------------------------- The code execution cannot proceed because event.dll was not found. Reinstalling the program may fix this problem.--------------------------- OK---------------------------" I think, put here here in what: in this place,  additional dependences are specified, it is possible to interpose only DYNAMIC LINK LIBRARIES. It is a consequence of that under Windows is DLL. But as libevent does not exist in the form of DLL - means, other magic that  learned, how  with this library is necessary what that

10

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

Hello, reversecode, you wrote: R> in  it is full of video, well  R> give I will look for you R> https://youtu.be/F4mB2Atu6J4? t=344 Thanks, I did it and at me it in an initial question is written: http://junecat.ru/Storage/oth/le_pic5.jpg It does not lead to success, probably because if to thrust library in this place - that the assembly happens, but at start the error--------------------------- LibeEx1.exe - System Error--------------------------- The code execution cannot proceed because event.dll was not found is produced. Reinstalling the program may fix this problem.--------------------------- OK--------------------------- I Think that thus the m  marks the link in *.obj - a file as demanding dynamic binding (that is as I understand, bindings at program start) and in this case the code from library does not try to be interposed at all into mine EXE

11

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

GC> Still, I suspect there the preprocessor character it is necessary to install correctly. And what this such and how ?

12

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

Hello, SteeLHeaD, you wrote: GC>> Still, I suspect there the preprocessor character it is necessary to install correctly. SLH> and what this such and how ? Tab \ ++-> Preprocessor-> Preprocessor Definitions if DLL really is not present (better to look in all  the project) that the character is in good spirits LIB_EVENT_USE_STATIC_LIB And generally it is better heading files esteem from libevent, event.h - there should be them .

13

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

Hello, SteeLHeaD, you wrote: SLH>--------------------------- SLH> The code execution cannot proceed because event.dll was not found. Reinstalling the program may fix this problem. SLH>--------------------------- the Problem is accurately specified: I am not found event.dll SLH> I think, put here here in what: in this place,  additional dependences are specified, SLH> it is possible to interpose only DYNAMIC LINK LIBRARIES. A lie. At you it is simple  it is collected for dynamic , and.lib - only the adapter for loading.dll SLH> Is a consequence of that under Windows is DLL. SLH> But as libevent does not exist in the form of DLL - means, other magic that  learned how  with this library with.dll  it is impossible is necessary what that. Normally  with.lib, also receive.exe which depends on presence.dll

14

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

Correct lib specify (most likely *core.lib)

15

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

K13> the Problem is accurately specified: it is not found event.dll Thanks for council. Yes, such piece about which you speak - is often applied in windows - programs. I think that here - not that case. Because event.dll does not exist in the nature. libevent - as I understood from  - as much as possible  and does not exist in the form of DLL - . It is necessary as that to explain to studio that to me it is necessary in this place static  with  event.lib. And to remove these  from this places in which I thrust them in attempts though as that to collect the project (junecat.ru/Storage/oth/le_pic5.jpg)

16

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

Hello, SteeLHeaD, you wrote: SLH> I Think that here - not that case. SLH> because event.dll does not exist in the nature. SLH> libevent - as I understood from  - as much as possible  and does not exist in the form of DLL - . I think that exists. From a file \include\event2\visibility.h: #if defined (event_shared_EXPORTS) || \defined (event_extra_shared_EXPORTS) || \defined (event_core_shared_EXPORTS) || \defined (event_pthreads_shared_EXPORTS) || \defined (event_openssl_shared_EXPORTS) # if defined (__ SUNPRO_C) && (__ SUNPRO_C> = 0x550) # define EVENT2_EXPORT_SYMBOL __ global # elif defined __ GNUC __ # define EVENT2_EXPORT_SYMBOL __ attribute __ ((visibility ("default"))) # elif defined (_MSC_VER) # define EVENT2_EXPORT_SYMBOL __ declspec (dllexport) # else # define EVENT2_EXPORT_SYMBOL/* unknown compiler */# endif #else/* event_ * _ EXPORTS */# define EVENT2_EXPORT_SYMBOL #endif/* event_ * _ EXPORTS *//** We need to dllimport event_debug_logging_mask_ into event_extra */#if defined (_MSC_VER) # if defined (event_core_shared_EXPORTS) / ** from core export */# define EVENT2_CORE_EXPORT_SYMBOL __ declspec (dllexport) # elif defined ( event_extra_shared_EXPORTS) / ** from extra import */# define EVENT2_CORE_EXPORT_SYMBOL __ declspec (dllimport) # endif #endif/* _MSC_VER */#if! defined (EVENT2_CORE_EXPORT_SYMBOL) # define EVENT2_CORE_EXPORT_SYMBOL EVENT2_EXPORT_SYMBOL #endif the compiler _MSC_VER is checked is  Microsoft. And if compiler Makjrosoft - on are used  for MS things such as __ declspec (dllexport) - marks that the given function will be exported from . __ declspec (dllimport) - on the contrary - function will undertake from DLL. Things, standard for Windows. So it is meant any DLL.

17

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

18

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

Hello, SteeLHeaD, you wrote: SLH> 3) I looked in a file event.h - it in the size of three kilobytes, is more than half consists from copyright - messages, and not  any examples of usage or special words of type "in case of usage under windows - make here it" it is not necessary to perceive it literally, there still a heap of any titles. , try to define the character of preprocessor EVENT2_EXPORT_SYMBOL

19

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

Hello, GhostCoders, you wrote: GC> Hello, SteeLHeaD, you wrote: SLH>> I Think that here - not that case. SLH>> because event.dll does not exist in the nature. SLH>> libevent - as I understood from  - as much as possible  and does not exist in the form of DLL - . GC> I Think that exists. GC> from a file \include\event2\visibility.h: GC> GC>#if defined (event_shared_EXPORTS) || \GC> defined (event_extra_shared_EXPORTS) || \GC> defined (event_core_shared_EXPORTS) || \GC> defined (event_pthreads_shared_EXPORTS) || \GC> defined (event_openssl_shared_EXPORTS) GC># if defined (__ SUNPRO_C) && (__ SUNPRO_C> = 0x550) GC># define EVENT2_EXPORT_SYMBOL __ global GC># elif defined __ GNUC __ GC># define EVENT2_EXPORT_SYMBOL __ attribute __ ((visibility ("default"))) GC># elif defined (_MSC_VER) GC># define EVENT2_EXPORT_SYMBOL __ declspec (dllexport) GC># else GC># define EVENT2_EXPORT_SYMBOL/* unknown compiler */GC># endif GC>#else/* event_ * _ EXPORTS */GC># define EVENT2_EXPORT_SYMBOL GC>#endif/* event_ * _ EXPORTS */GC> / ** We need to dllimport event_debug_logging_mask_ into event_extra */GC>#if defined (_MSC_VER) GC># if defined (event_core_shared_EXPORTS) / ** from core export */GC># define EVENT2_CORE_EXPORT_SYMBOL __ declspec ( dllexport) GC># elif defined (event_extra_shared_EXPORTS) / ** from extra import */GC># define EVENT2_CORE_EXPORT_SYMBOL __ declspec (dllimport) GC># endif GC>#endif/* _MSC_VER */GC>#if! defined (EVENT2_CORE_EXPORT_SYMBOL) GC># define EVENT2_CORE_EXPORT_SYMBOL EVENT2_EXPORT_SYMBOL GC>#endif GC> GC> it is checked the compiler _MSC_VER is  Microsoft. GC> and if compiler Makjrosoft - on are used  for MS things such as __ declspec (dllexport) - marks that the given function will be exported from . GC> __ declspec (dllimport) - on the contrary - function will undertake from DLL. GC> Things, standard for Windows. So it is meant any DLL. COOL! now at me the program is launched, the message at start: [warn] evsig_init_: socketpair: Either the application has not called WSAStartup, or WSAStartup failed. Expensive person how I can thank you? You did not send me from the first remark, and you together we achieve a victory.

20

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

21

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

22

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

If to connect *core.lib that  are not necessary but anyway you selected not that way for learning of programming better to begin with simple book examples and

23

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

Hello, reversecode, you wrote: R> if to connect *core.lib R> that  are not necessary R> but anyway you selected not that way for learning of programming R> better to begin with simple book examples and  As it to make? I mean - to connect to the project?

24

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

Hello, SteeLHeaD, you wrote: R>> if to connect *core.lib R>> that  are not necessary R>> but anyway you selected not that way for learning of programming R>> better to begin with simple book examples and  SLH> As it to make? SLH> I mean - to connect to the project? It is possible to register directly in the source code something of type: #pragma comment (lib, "OtherLib700.lib") ways to  should be registered in adjustments

25

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

http://rsdn.org/forum/cpp.applied/7054980.1 the Author: reversecode Date: 14.02 16:15 and generally throw you it of programming it not your calling