crt

Does _control87() also set the SSE MXCSR Control Register?

元气小坏坏 提交于 2019-12-10 21:23:13
问题 The documentation for _control87 notes: _control87 [...] affect[s] the control words for both the x87 and the SSE2, if present. It seems that the SSE and SSE2 MXCSR control registers are identical, however, there is no mention of the SSE unit in the documentation. Does _control87 affect an SSE unit's MXCSR control register or is this only true for SSE2? 回答1: I dug out an old Pentium III and checked with the following code: #include <Windows.h> #include <float.h> #include <xmmintrin.h>

Crt unit for Delphi 2010 [closed]

只愿长相守 提交于 2019-12-10 12:26:34
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I need Crt unit for Delphi 2010 console application (ReadKey, GotoXY, ...). Is there any Crt unit for Delphi 2010? 回答1: I'd start with any of the CRT units here. 回答2: I updated the code from Branko's link, and came up with this: https://onedrive.live.com/embed?cid=F5BB35AE00415BC7&resid=F5BB35AE00415BC7%21232

CRT virtual destructor

…衆ロ難τιáo~ 提交于 2019-12-08 19:40:02
问题 I ran into a heap corruption today caused by different CRT settings (MTd MDd) in my dll and my actual project. What I found strange is that the application only crashed when I set the destructor in the dll to be virtual. Is there an easy explanation for that? I get that I can't free memory that's not on my heap, but where exactly is the difference when I define the destructor as non-virtual. Some Code just to make it a little clearer The DLL #pragma once class CTestClass { public: _declspec

GNU as, puts works but printf does not

空扰寡人 提交于 2019-12-08 09:29:02
问题 This is the code I am playing with right now: # file-name: test.s # 64-bit GNU as source code. .global main .section .text main: lea message, %rdi push %rdi call puts lea message, %rdi push %rdi call printf push $0 call _exit .section .data message: .asciz "Hello, World!" Compilation instructions: gcc test.s -o test Revision 1: .global main .section .text main: lea message, %rdi call puts lea message, %rdi call printf mov $0, %rdi call _exit .section .data message: .asciz "Hello, World!"

Assertion error in CRT calling _osfile() in VS 2008?

点点圈 提交于 2019-12-07 06:27:05
问题 I have a C++ code base that has been working for a long time. The code base was a legacy VS 2003 set of projects that I recently migrated to VS 2008. The migration seemed to be successful in that the resulting program built, and run. I reinstalled my OS and all applications on a fresh drive, and now when I attempt to debug the program within the debugger, I receive an assertion error inside the CRT's chsize (really, _chsize_s ). Specifically (cropped to essentials, ignoring safety checks):

Visual C++ 中的重大更改

一世执手 提交于 2019-12-06 22:35:05
此文章由人工翻译。 将光标移到文章的句子上,以查看原文。 更多信息。 Visual C++ 中的重大更改 Visual Studio 2015 当你升级到 Visual C++ 编译器的新版本后,可能会在之前编译并正常运行的代码中遇到编译和/或运行时错误。新版本中会引起这类问题的更改称为 重大更改 ,通常,修改 C++ 语言标准、函数签名或内存中的对象布局时需要进行这种更改。 若要避免难以检测和诊断的运行时错误,我们建议你永远不静态链接到使用不同编译器版本编译的二进制文件。此外,当你升级 EXE 或 DLL 项目时,请确保升级它所链接的库。如果使用 CRT(C 运行时库)或 STL(标准模板库)类型,请勿在使用不同编译器版本编译的二进制文件(包括 DLL)之间传递这些类型。有关详细信息,请参阅 跨 DLL 边界传递 CRT 对象时可能的错误 。 我们进一步建议,你在编写代码时永远不依赖除 COM 接口或 POD 对象以外的特定对象布局。如果确实要编写此类代码,则必须在升级后确保其正常运行。有关详细信息,请参阅 ABI 边界处的可移植性(现代 C++) 。 本文的其余部分介绍了 Visual Studio 2015 中的 Visual C++ 中具体的重大更改,并且在本文中,术语“新行为”或“现在”均指该版本。术语“旧行为”和“之前”指 Visual Studio 2013

VC编译错误:LIBCMT.lib(crt0.obj) : error LNK2001: un...

三世轮回 提交于 2019-12-06 01:45:23
错误信息:LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main 在ATL . server工程中加入一个自己开发的dll库,结果导致上述问题。dll的入口函数问题。 解决办法就是, 去掉编译器选项的_ATL_MIN_CRT宏定义 。 转 : 有的时候, 在ATL控件中可能需要使用C/C++运行库, 这个时候由于默认的ATL工程中定义了宏_ATL_MIN_CRT,那么,可能阻止了release工程的编译, 出现类似于下面的错误 MSVCRT.lib(MSVCRT.dll) : error LNK2005: _free already defined in StdAfx.obj MSVCRT.lib(MSVCRT.dll) : error LNK2005: _malloc already defined in StdAfx.obj MSVCRT.lib(MSVCRT.dll) : error LNK2005: _realloc already defined in StdAfx.obj MSVCRT.lib(MSVCRT.dll) : warning LNK4006: _free already defined in StdAfx.obj; second definition ignored

vs 2013---error C4996: &apos;fopen&apos;:

久未见 提交于 2019-12-06 01:44:33
vs 出现这个问题 error C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 解决办法: 打开: 项目--->项目属性--->配置属性--->C/C++--->预处理器 第一行的 预处理器定义添加 _CRT_SECURE_NO_WARNINGS 问题解决了 来源: oschina 链接: https://my.oschina.net/u/2445348/blog/649232

How to get RSA key from -----BEGIN CERTIFICATE--— from.crt and .pem file?

房东的猫 提交于 2019-12-05 18:25:22
I'm having .crt and .pem file with -----BEGIN CERTIFICATE----- MIIFSDCCBDCg........................................ -----END CERTIFICATE----- and I want RSA key from this file. anyone is having any idea that how we can do that. I have used below command one by one openssl rsa -in XXX.crt -out input1.der -outform DER openssl rsa -in input1.der -inform DER -out key.pem -outform PEM But, It gives error: unable to load Private Key 140331982231200:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:703:Expecting: ANY PRIVATE KEY and I have also used different command but it give above

Verifying CRT used in library (.lib)

假装没事ソ 提交于 2019-12-05 17:28:10
问题 How do I check what runtime library a static library (.lib) in Windows has linked to? I'm compiling my project with /MDd and I presume a library I'm linking to is using /MTd Multi-threaded Debug Error 7 error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit@std@@QAE@XZ) already defined in libcpmtd.lib(xlock.obj) C:\...\msvcprtd.lib(MSVCP100D.dll) LIBCPMTD.LIB = Multithreaded, static link I know there's an option /NODEFAULTLIB:"libcpmtd.lib" which I've tried and succeeded