[Lldb-commits] [PATCH] D11967: Export snprintf to avoid linking error with liblldb on Windows.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 11 18:26:59 PDT 2015


You need to use LIBLLDB_API instead of __declspec(export).  Otherwise
someone linking against liblldb and trying to call this won't work
correctly.  Check the annotation given to the classes in the SB headers for
the exact name of the macro.

On Tue, Aug 11, 2015 at 6:23 PM Chaoren Lin <chaorenl at google.com> wrote:

> This revision was automatically updated to reflect the committed changes.
> Closed by commit rL244710: Export snprintf to avoid linking error with
> liblldb on Windows. (authored by chaoren).
>
> Changed prior to commit:
>   http://reviews.llvm.org/D11967?vs=31884&id=31896#toc
>
> Repository:
>   rL LLVM
>
> http://reviews.llvm.org/D11967
>
> Files:
>   lldb/trunk/include/lldb/Host/windows/win32.h
>
> Index: lldb/trunk/include/lldb/Host/windows/win32.h
> ===================================================================
> --- lldb/trunk/include/lldb/Host/windows/win32.h
> +++ lldb/trunk/include/lldb/Host/windows/win32.h
> @@ -65,7 +65,8 @@
>  int strncasecmp(const char* s1, const char* s2, size_t n);
>
>  #if _MSC_VER < 1900
> -int snprintf(char *buffer, size_t count, const char *format, ...);
> +int __declspec(dllexport)
> +snprintf(char *buffer, size_t count, const char *format, ...);
>  #endif
>
>  #define STDIN_FILENO  0
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150812/23183730/attachment.html>


More information about the lldb-commits mailing list