Questions tagged [crt]

For issues relating to utilizing the C runtime library.

The C runtime library is a special program library used by a compiler, to implement functions built into the C programming language, during the execution (runtime) of a computer program.

Not to be confused with CRT terminals.

364 questions
5
votes
2 answers

MSVCRTD.lib(cpu_disp.obj) : warning LNK4210: .CRT section exists; there may be unhandled static initializers or terminators

I know this question has popped up before but I could not find a good answer so I try here. I have a pure C dll (Win32) and I get this warning when compiling: MSVCRTD.lib(cpu_disp.obj) : warning LNK4210: .CRT section exists; there may be…
Johan
  • 51
  • 1
  • 2
5
votes
4 answers

Why is memory not reusable after allocating/deallocating a number of small objects?

While investigating a memory link in one of our projects, I've run into a strange issue. Somehow, the memory allocated for objects (vector of shared_ptr to object, see below) is not fully reclaimed when the parent container goes out of scope and…
DarkWanderer
  • 8,739
  • 1
  • 25
  • 56
5
votes
2 answers

MS Visual Studio 2012 ultimate doesn't start because of MSVCR110.dll

When I try to run MVS 2012 I always get an error - entry point to procedure _crtCreateSymbolicLinkW was not found in library DLL MSVCR110.dll. I've already copied this dll file from my other computer where everything is working but it didn't…
Ophelia
  • 549
  • 1
  • 5
  • 26
5
votes
2 answers

Thread creation, the CRT and DLL's how is it meant to be done?

So I understand that CreateThread and the CRT can result in memory leaks, signal doesn't work, and one should use the _beginthread or _beginthreadex functions. That is all very well when writing an application, but what about those that are writing…
Fire Lancer
  • 29,364
  • 31
  • 116
  • 182
5
votes
1 answer

How to un-AssignCrt(Output)?

In TurboPascal program i took an advantage of DOS processed output and use Tab control character to form columns in the output: const Tab = #09; ... Writeln(X, Tab, F(X)); However, when i tried to add a pause-like functionality via ReadKey call and…
user1242199
5
votes
5 answers

Avoiding the CRT

When writing a C++ application, I normally limit myself to C++ specific language features. Mostly this means using STL instead of CRT where ever possible. To me, STL is just so much more fluid and maintainable than using CRT. Consider the…
void.pointer
  • 24,859
  • 31
  • 132
  • 243
4
votes
0 answers

LetsEncrypt Challenge failed for domain

Running this with my domain: sudo certbot certonly --standalone --preferred-challenges http --server https://acme-staging-v02.api.letsencrypt.org/directory --register-unsafely-without-email -d example.com Saving debug log to…
Chris G.
  • 23,930
  • 48
  • 177
  • 302
4
votes
1 answer

Extract public key from certificate

Is there a way to extract the public key from a certificate using C#? I have a certificate file with .crt extension.
hs2d
  • 6,027
  • 24
  • 64
  • 103
4
votes
1 answer

openssl Unable to load private key PEM_do_header:bad decrypt

I am unable to decrypt a keyfile. @YY200146:/mnt/c/source/keycloak-orig/keycloak/traefik/certs$ openssl rsa -in saml.key -out nopassword.key Enter pass phrase for saml.key: unable to load Private Key 139720414335424:error:06065064:digital envelope…
1291
  • 117
  • 1
  • 2
  • 6
4
votes
2 answers

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

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…
Felix G
  • 674
  • 1
  • 7
  • 17
4
votes
1 answer

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

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 =…
John Doe
  • 399
  • 1
  • 4
  • 23
4
votes
3 answers

Visual C++: possible to limit heap size?

I have a problem with an application I'm debugging. Steady state memory usage is a few hundred megabytes. Occasionally (after several hours) it gets into a state where its memory usage soars to many gigabytes. I would like to be able to stop the…
paperjam
  • 8,321
  • 12
  • 53
  • 79
4
votes
3 answers

CRT Doesn't print line number of memory leak

I've got the code below, which I think, based on Finding Memory Leaks Using the CRT Library, should print out the line number of a memory leak. #include "stdafx.h" #define _CRTDBG_MAP_ALLOC #include #include #include…
Carbon
  • 3,828
  • 3
  • 24
  • 51
4
votes
8 answers

Fastest way to get the null char in a copied string in C

I need to get the pointer to the terminating null char of a string. Currently I'm using this simple way: MyString + strlen(MyString) which is probably quite good out of context. However I'm uncomfortable with this solution, as I have to do that…
lornova
  • 6,667
  • 9
  • 47
  • 74
4
votes
1 answer

C++/CLI Application Crashing On Start (_register_onexit_function)

Alright, I have a C++/CLI application that works just perfectly on debug mode, however when I change the build to release, the program crashes before it even reaches the main() function. I am using Visual Studio Enterprise 2015. Here are screenshots…
Zer0Mem0ry
  • 61
  • 4