crt

Correct way to distribute VC++ runtime files

≯℡__Kan透↙ 提交于 2019-12-04 05:11:54
I have an MFC application which I am trying to package for deployment. It seems to depend on the files 'msvcr90.dll', 'msvcp90.dll' and 'mfc90.dll'. What is the correct way to distribute these files? I can't use merge modules as my installer doesn't support them. I know I can run VCRedist_x86.exe, but I don't want to do this for various reasons. As far as I can see my only alternative is to install the files as Private Side-by-Side assemblies. Is this correct? According to http://msdn.microsoft.com/en-us/library/ms235317(VS.80).aspx the correct way to install a private assembly is to copy the

Statically linking against library built with different version of C Runtime Library, ok or bad?

≯℡__Kan透↙ 提交于 2019-12-04 02:58:01
Consider this scenario: An application links to 3rd party library A. A is built using MSVC 2008 and is statically linking (ie. built with /MT) to the C Runtime Library v9.0. The application is built using MSVC 2005 and is statically linking to A and (using /MT) to the C Runtime Library v8.0. I can see trouble with this - for instance if types are changed in the headers between runtime library versions. Is care taken to keep the runtime library headers compatible between versions, or should one always make sure all statically linked libraries are linking to the same version of the runtime

Verifying CRT used in library (.lib)

大憨熊 提交于 2019-12-04 02:57:38
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 with, but I'd rather avoid that. I was able to fix this doing the following > dumpbin /DIRECTIVES C:\.

Building Visual C++ app that doesn't use CRT functions still references some

喜夏-厌秋 提交于 2019-12-03 14:22:49
This is part of a series of at least two closely related, but distinct questions. I hope I'm doing the right thing by asking them separately. I'm trying to get my Visual C++ 2008 app to work without the C Runtime Library. It's a Win32 GUI app without MFC or other fancy stuff, just plain Windows API. So I set Project Properties -> Configuration -> C/C++ -> Advanced -> Omit Default Library Names to Yes (compiler flag /Zl ) and rebuilt. Let's pretend I have written a suitable entry point function, which is the subject of my other question. I get two linker errors; they are probably related. The

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

匿名 (未验证) 提交于 2019-12-03 08:46:08
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: 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): FILE * testfile = fopen("P:\\_Dan\\local\\foogoo.txt

Cannot import Tensorflow for GPU on Windows 10

匿名 (未验证) 提交于 2019-12-03 08:30:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Trying to install the gpu version of Tensorflow on my machine, but I'm getting this error when trying 'import tensorflow' ImportError Traceback (most recent call last) C:\Users\snh5_000\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflo w_internal.py in swig_import_helper() 17 try: ---> 18 return importlib.import_module(mname) 19 except ImportError: C:\Users\snh5_000\Anaconda3\lib\importlib__init__.py in import_module(name, pac kage) 125 level += 1 --> 126 return _bootstrap._gcd_import(name[level:], package, level) 127

Only RSAPrivate (Crt) KeySpec and PKCS8EncodedKeySpec supported for RSA private keys

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I following the steps from the link : How to read .pem file to get private and public key . I executed the following three commands: 1. $openssl genrsa -out mykey.pem 2048 2. $openssl pkcs8 -topk8 -inform PEM -outform PEM -in mykey.pem -out private_key.pem -nocrypt 3. $ openssl rsa -in mykey.pem -pubout -outform DER -out public_key.der This created three files, but when I was trying to read those through Java code I started facing below error: PUBLIC KEY EXPO : 65537 Only RSAPrivate(Crt)KeySpec and PKCS8EncodedKeySpec supported for RSA

crt0.o and crt1.o — What's the difference?

浪子不回头ぞ 提交于 2019-12-03 02:38:59
问题 Recently I've been trying to debug some low-level work and I could not find the crt0.S for the compiler (avr-gcc) but I did find a crt1.S (and the same with the corresponding .o files). What is the difference between these two files? Is crt1 something completely different or what? They both seem to have to do with something for 'bootstrapping' (setting up stack frame and such), but why the distinction? 回答1: Both crt0/crt1 do the same thing, basically do what is needed before calling main()

Convert .pem to .crt and .key

匿名 (未验证) 提交于 2019-12-03 02:11:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Can anyone tell me the correct way/command to extract/convert the certificate .crt and private key .key files from a .pem file? I just read they are interchangable, but not how. 回答1: I was able to convert pem to crt using this: openssl x509 -outform der -in your-cert.pem -out your-cert.crt 回答2: Converting Using OpenSSL These commands allow you to convert certificates and keys to different formats to make them compatible with specific types of servers or software. Convert a DER file (.crt .cer .der) to PEM openssl x509 -inform der -in

GB/T 36624-2018《可鉴别的加密机制》笔记――6. 机制5:GCM

匿名 (未验证) 提交于 2019-12-02 23:59:01
说明:以下章节写为第10章是为了和标准GB/T 36624-2018的章节对应 10. 机制5――GCM GCM是一种有大吞吐能力的加密认证模式。其中主要适用了CRT模式和类似CBC模式的GHASH模式。CRT模式基本上没有大多变化,GHASH则是利用有限域上的乘法进行HASH,此运算可以通常预先计算和查表优化加速。 GCM两个基本模块 GHASH和GCTR。加解密和认证验证过程都离不开这两个模块。 参考文献 NIST SP 800-38D The Galois Counter Mode of Operation (GCM) GB/T 36624-2018 的建议 10.1 GCTR GCTRK (ICB, X)的流程 准备: 128比特的分组密钥CIPH 密钥K 输入: 初始计数块ICB; 任意长度的串X 输出: 串Y,长度为len(X). 步骤: 其中X1, X2,..., Xn-1是完整分块,而Xn*可能是完整分块也可能不是。 其中 inc_32(x)就是:x的低32bit做 ++x mod 2^32;x的高bit不做变化 GCTR的流程图如下: GCM中GCTR的流程图 10.2 GHASH GHASHH (X) 准备: 块H 输入: 消息X,长度为分组长度的整数倍,即len(X) = 128m 输出: GHASHH (X). 步骤: 其中 NIST SP 800-38D