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 <chaor...@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
>
>
>
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to