msvcrt

Why are there multiple C functions for case-insensitive comparison

混江龙づ霸主 提交于 2021-02-16 14:18:17
问题 For comparing any strings without considering their case, there are various C library functions such as strcasecmp() , stricmp() and stricmpi() . What is the difference between these? 回答1: There are multiple ways to do many things primarily because the standards process lags behind implementations. People see the need for a function (in this case, case insensitive string comparison) and some compiler writers/library writers implement a function called strcmpi , while another group implements

msvcrt alternative for MinGW? (e.g. to get conforming snprintf)

南笙酒味 提交于 2021-01-27 12:52:47
问题 So here's a fun one... we have a few C libraries which should be platform independent, even though they were developed on linux, because they only rely on the c standard library as defined in ISO/IEC 9899:1999. When we compiled those libraries with MinGW everything seemed to work fine at first, but today we found out that the snprintf() implementation of msvcrt is braindea... sorry, i meant " incompatible " with the definition in the C99 standard. I would have expected a warning from MinGW,

Unable to link C runtime library (libcmt.lib) using lld-link.exe (Windows)

江枫思渺然 提交于 2020-08-08 04:29:05
问题 I'm writing a language using LLVM. I'd like to avoid having to package clang and simply use the LLVM tools (ex. lld, lld-link). I've been trying to invoke the printf function from my simple IR code ( testinput.ll ): ; ModuleID = 'Test2' source_filename = "entry" @str_0 = private unnamed_addr constant [13 x i8] c"Hello world!\00" declare i32 @printf(i8*, ...) define i32 @main() { entry: %anonymous_10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @str_0, i32 0,

Do I still need to install Microsoft VC++ 2015 runtime redistributable if I already have Microsoft VC++ 2017 runtime installed?

我的梦境 提交于 2020-07-09 11:32:22
问题 From what I read about these posting and elsewhere, regarding the issue of why I cannot install Microsoft VC++ 2015 runtime redistributable if I already have Microsoft VC++ 2017 runtime installed. The reason for this "cannot install" is because once you have Microsoft VC++ 2017 installed, there is no need to install 2015 version,as 2017 subsume 2015. Am I right? Secondly, and more crucially, from now onwards if I have a higher version of Microsoft VC++ installed, I can safely skip the lower

Do I still need to install Microsoft VC++ 2015 runtime redistributable if I already have Microsoft VC++ 2017 runtime installed?

偶尔善良 提交于 2020-07-09 11:31:05
问题 From what I read about these posting and elsewhere, regarding the issue of why I cannot install Microsoft VC++ 2015 runtime redistributable if I already have Microsoft VC++ 2017 runtime installed. The reason for this "cannot install" is because once you have Microsoft VC++ 2017 installed, there is no need to install 2015 version,as 2017 subsume 2015. Am I right? Secondly, and more crucially, from now onwards if I have a higher version of Microsoft VC++ installed, I can safely skip the lower

msvcrt.getch() returning b'a' instead of 'a'?

社会主义新天地 提交于 2020-05-17 08:03:49
问题 I have the following code from one class: class _Getch: def __init__(self): self.impl = _GetchWindows() def read_key(self): return self.impl() class _GetchWindows: def __init__(self): import msvcrt def __call__(self): import msvcrt return msvcrt.getch() And then I have another class that imported _Getch. Within this other class, I tried to use the read_key provided by _Getch to do things in the conditional: r = _Getch() key = r.read_key() print(key) if key = 'a': #do things elif key = 's': #

CRT initialization and DLLMain

て烟熏妆下的殇ゞ 提交于 2020-01-23 01:35:23
问题 Quotes: From the document "Best Practices for Creating DLLs" http://download.microsoft.com/download/a/f/7/af7777e5-7dcd-4800-8a0a-b18336565f5b/DLL_bestprac.doc of Microsoft: "DLLs often have complex interdependencies that implicitly define the order in which they must be loaded. The library loader efficiently analyzes these dependencies, calculates the correct load order, and loads the DLLs in that order." [1] "(within DLLMain) Use the memory management function from the dynamic C Run- Time

Side-by-side configuration error (Microsoft.VC80.CRT v8.0.50608.0)

a 夏天 提交于 2020-01-11 05:26:08
问题 I have an assembly with the following manifest embedded: <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity> </dependentAssembly> </dependency> </assembly> On one of my machines this assembly doesn't work (the assembly fails to load). Opening this in dependency walker gives me the

VC++: Code works in VS2010 and breaks in VS2013

久未见 提交于 2020-01-05 14:02:49
问题 Edit: unlike the case in the question noted in the vote-to-close, the offending code here is CRT code, not mine . Even if it has a problem (which I'm pretty sure it doesn't), I have no way of fixing its source. We have some legacy memory-leak tracing code that uses some CRT internals (nothing too exotic, essentially _CrtMemBlockHeader which is sort-of documented). While trying to migrate from VS2010 to VS2013 the code seems to cause sporadic build failures, and the offending part can be

C functions before mainCRTStartup on Mingw?

女生的网名这么多〃 提交于 2020-01-05 12:16:22
问题 void start() { stuff(); //code before mainCRTStartup mainCRTStartup(); } int main() { //other code } In Visual C++,it compiles fine and function "stuff()" gets called before main. How would call "stuff()" before "mainCRTStartup()"? on Mingw(OS:Windows NT)? it seems to ignore "void start()". 回答1: You could use the -e argument to ld (the linker) to specify start as your entry point. I'm not sure how to feed arguments to ld using mingw; perhaps someone can edit my answer to provide that. 回答2: