Skip to content

Commit

Permalink
Make event_debug_get_logging_mask_() real symbol (win32)
Browse files Browse the repository at this point in the history
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_
  • Loading branch information
azat committed May 29, 2017
1 parent ce3af53 commit 5f17c12
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions log-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions log.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f17c12

Please sign in to comment.