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.

331 questions
16
votes
2 answers

What is security cookie in C++?

I have read from Google that it is used for controlling buffer overruns at application level and it is called by CRT. It also says that " Essentially, on entry to an overrun-protected function, the cookie is put on the stack, and on exit, the value…
Bhupesh Pant
  • 3,341
  • 5
  • 37
  • 64
16
votes
3 answers

What functions does _WinMainCRTStartup perform?

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…
Thomas
  • 150,847
  • 41
  • 308
  • 421
15
votes
3 answers

How can I write a Windows application without using WinMain?

Windows GUI applications written in C/C++ have 'WinMain' as an entry point (rather than 'main'). My understanding of this is that the compiler generates a 'main' function to be called by the C Runtime. This 'main' function sets up the necessary…
Matthew Murdoch
  • 28,946
  • 26
  • 89
  • 125
15
votes
1 answer

Visual Studio 2015: Compile C/C++ without a runtime library

Is there a way of compiling C/C++ with Visual Studio 2015 without using any runtime library? I need to compile without a runtime library because I'm creating my own runtime library (for my OS). There are options on C/C++->Code Generation->Runtime…
SeeSoftware
  • 351
  • 5
  • 15
15
votes
4 answers

How to I update my C++ project in Visual Studio 2015 to use the new Universal CRT?

After VS2015 updated my project to the new Platform toolset v140, it fails to build due to a linker error : LNK1104 cannot open file 'libucrt.lib'. It appears this library has been moved around due to the new Universal CRT as mentioned in this…
Jesse Meyer
  • 305
  • 1
  • 3
  • 12
13
votes
2 answers

How to resolve crt0.o linking issue in cross compiling?

How to add ctr0.o ? I get this error: yagarto-4.7.2/bin/arm-none-eabi-ld: cannot find crt0.o: No such file or directory collect2: error: ld returned 1 exit status` while compiling very simple program from here: /* -- first.s */ /* This is a…
0x90
  • 34,073
  • 33
  • 137
  • 218
11
votes
2 answers

Verifying CRT used in library (.lib)

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…
Mohamed Bana
  • 1,091
  • 2
  • 14
  • 24
11
votes
4 answers

How to install VC80CRT debug runtimes without full visual studio 2005?

I can't run a debug sdk application because it requires both VC 8 and VC 9 versions of the CRT. But it only requires visual studio 2008 for plugin dev, which is what I need. How do I install the debug runtimes from 2005 on to a Windows7 machine? I…
Ben L
  • 1,351
  • 1
  • 14
  • 29
11
votes
2 answers

Convert .crt file to .cer and .key

I was asked to help converting a certificate for a renewal. I was given the domainname.crt file along with some intermediate .crt files, but no .key file. They want me to convert the CRT to both a .CER and a .KEY file. I have looked at the following…
user1970778
  • 291
  • 2
  • 5
  • 10
11
votes
1 answer

What is the difference between crtbegin.o, crtbeginT.o and crtbeginS.o?

I'm trying to link directly using ld to isolate a build problem. When I include /usr/lib/gcc/x86_64-linux-gnu/4.7/libstdc++.so, I get a few issues: ac-aaa.o: In function `__static_initialization_and_destruction_0': /usr/include/c++/4.7/iostream:75:…
jww
  • 83,594
  • 69
  • 338
  • 732
10
votes
6 answers

Using _crtBreakAlloc to find memory leaks - identifier "_crtBreakAlloc" is unidentified

I am trying to use _crtBreakAlloc in the Watch window as suggested in this link, but the value line says that 'identifier "_crtBreakAlloc" is unidentified' and it simply does not work. What am I doing wrong? I'm using Visual Studio by the way. An…
Sunspawn
  • 767
  • 1
  • 8
  • 26
10
votes
1 answer

check what run-time static library or dll uses

is there a tool in windows SDK to ckeck what CRT a library uses? for example I have a *.lib file, how do check if it's compiled with /MDd flag or /MT? also how to check the same for dll or exe? can this be done with dumpbin?
codekiddy
  • 5,217
  • 9
  • 46
  • 73
9
votes
2 answers

"getenv... function ... may be unsafe" - really?

I'm using MSVC to compile some C code which uses standard-library functions, such as getenv(), sprintf and others, with /W3 set for warnings. I'm told by MSVC that: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s…
einpoklum
  • 86,754
  • 39
  • 223
  • 453
9
votes
3 answers

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

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…
Viktor
  • 3,175
  • 2
  • 23
  • 25
9
votes
6 answers

Does a memory leak at unload of a DLL cause a leak in the host process?

Consider this case: dll = LoadDLL() dll->do() ... void do() { char *a = malloc(1024); } ... UnloadDLL(dll); At this point, will the 1k allocated in the call to malloc() be available to the host process again? The DLL is statically linking to…
Viktor
  • 3,175
  • 2
  • 23
  • 25
1
2
3
22 23