libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] Run-Time Check Failure(Static Link in Debug)


From: luozhaotian
Subject: [libmicrohttpd] Run-Time Check Failure(Static Link in Debug)
Date: Mon, 11 Sep 2023 17:14:13 +0800 (CST)

When test https://www.gnu.org/software/libmicrohttpd/tutorial.html chapter 5 Supporting basic authentication(libmicrohttpd-0.9.77/doc/examples/basicauthentication.cpp), i encounter this error:
Run-Time Check Failure #1 - A cast to a smaller data type has caused a loss of data.  If this was intentional, you should mask the source of the cast with the appropriate bitmask.  

The call stack: 
> Hello.exe!MHD_base64_to_bin_n(const char * base64, unsigned __int64 base64_len, void * bin, unsigned __int64 bin_size) line 1422
  Hello.exe!MHD_basic_auth_get_username_password(MHD_Connection * connection, char * * password) line 95
  Hello.exe!answer_to_connection(void * cls, MHD_Connection * connection, const char * url, const char * method, const char * version, const char * upload_data, unsigned __int64 * upload_data_size, void * * con_cls) line 46
  Hello.exe!call_connection_handler(MHD_Connection * connection) line 3070
        ......
       MHD_basic_auth_get_username_password

I use Visual Studio 2022
Microsoft Visual Studio Community 2022 (64 位) - Current Version 17.5.3

I use Debug_x64 , and static link  to 0.9.77\x86_64\VS2022\Debug-static\libmicrohttpd_d.lib
But use dll is ok.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]