From 5f17c12de021c070501e97268e595da82bf38879 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Mon, 29 May 2017 20:46:33 +0300 Subject: [PATCH] Make event_debug_get_logging_mask_() real symbol (win32) I cannot made it work without this, even though dumpbin shows that that symbol exists in the event_core.dll, event_extra.dll failed to compile: ==> win: Creating library C:/vagrant/.cmake-vagrant/lib/Debug/event_extra.lib and object C:/vagrant/.cmake-vagrant/lib/Debug/event_extra.exp ==> win: http.obj : error LNK2001: unresolved external symbol _event_debug_logging_mask_ [C:\vagrant\.cmake-vagrant\event_extra_shared.vcxproj] ==> win: C:\vagrant\.cmake-vagrant\bin\Debug\event_extra.dll : fatal error LNK1120: 1 unresolved externals [C:\vagrant\.cmake-vagrant\event_extra_shared.vcxproj] ==> win: Done Building Project "C:\vagrant\.cmake-vagrant\event_extra_shared.vcxproj" (default targets) -- FAILED. And dumpbin: sh-4.1$ /cygdrive/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio\ 12.0/VC/bin/amd64/dumpbin.exe /EXPORTS ./bin/Debug/event_core.dll M 202 C9 00059A3C event_debug_logging_mask_ = _event_debug_logging_mask_ --- log-internal.h | 4 ++-- log.c | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/log-internal.h b/log-internal.h index fb53df416a..1451ab2abb 100644 --- a/log-internal.h +++ b/log-internal.h @@ -48,8 +48,8 @@ extern "C" { #endif #ifdef EVENT_DEBUG_LOGGING_ENABLED -EVENT2_EXPORT_SYMBOL extern ev_uint32_t event_debug_logging_mask_; -#define event_debug_get_logging_mask_() (event_debug_logging_mask_) +EVENT2_EXPORT_SYMBOL +int event_debug_get_logging_mask_(); #else #define event_debug_get_logging_mask_() (0) #endif diff --git a/log.c b/log.c index a9debb864e..5a55ab75df 100644 --- a/log.c +++ b/log.c @@ -70,6 +70,12 @@ static event_fatal_cb fatal_fn = NULL; #endif EVENT2_EXPORT_SYMBOL ev_uint32_t event_debug_logging_mask_ = DEFAULT_MASK; + +EVENT2_EXPORT_SYMBOL +int event_debug_get_logging_mask_() +{ + return event_debug_logging_mask_; +} #endif /* EVENT_DEBUG_LOGGING_ENABLED */ void