Jump to content
Tuts 4 You



Recommended Posts

quick ?


Why the hell does my dev-c++  crash with exception c0000005 for any 








Edited by JMC31337
Link to comment

After careful observations.. fig'd out that including the following as linker options:


-lwinmm -lgdi32 -lws2_32 -lpsapi -masm=intel -lcomctl32 -DWIN32 -D_WIN32_IE=0x600 -D_MSC_VER=1100 -liphlpapi -lPSAPI -lwsock32


is all well.. with memcpy, zeromemory, memset, memmove  (memcmp  always works no matter what)


but the above API will throw that c0000005 access violation upon compiling if you include 




test it:

#include <stdio.h>
#include <string.h>
int main()
// define two arrays u, v and initialize u
int u[5] = {1, 2, 3, 4, 5}, v[5];
// copy u to v
memcpy(v, u, 5*sizeof(int));
// display v
for (int i = 0; i < 5; ++i)
printf("v[%d] = %d\n", i, v[i]);
return 0;

add -lntoskrnl and it will error out.. otherwise it compiles/runs fine





removing the -lntoskrnl

CPU - main thread, module ZMemSee


EAX 00000000

ECX 0022FFB0

EDX 7C90E514 ntdll.KiFastSystemCallRet

EBX 7FFD9000

ESP 0022FFC4

EBP 0022FFF0

ESI 0012B3FC

EDI 7C901000 ntdll.RtlEnterCriticalSection

EIP 00401220 ZMemSee.<ModuleEntryPoint>



adding -lntoskrnl: [C0000005 ACCESS VIOLATION]


CPU - main thread, module HAL


EAX 00000000

ECX 000008A1

EDX 7C90E514 ntdll.KiFastSystemCallRet

EBX 003F0CE6 Jump to HAL.HalInitSystem

ESP 0022F9E0

EBP 0022F9F0

ESI 00000D94

EDI 00000001




Edited by JMC31337
Link to comment

Use Codeblocks or Codelite instead.

you're not the first to say that.. thats for sure.. can i run em off usb like i do Dev-C++

Edited by JMC31337
Link to comment

Dev-C++ is extremely outdated and uses a very old version of MingW as its compiler. If you have issues with it, its probably due to its age.

You could try updating to a newer version of MinGW and have Dev-C++ use that instead.


You are better off looking for a better/newer IDE and compiler though, since the one you are using is really outdated and unsupported now.


My personal favorite is Visual Studio. I use 2013. (This is my opinion, and not a must, you are free to use whatever you want.)

Link to comment
  • 2 weeks later...

Thnx, I'll grab both portables (though 64 bit version will be for "just in case scenario")

I'll let ya know, since dev-c++ mirrors broke I haven't searched for more up to date ...

Edited by JMC31337
Link to comment

I would personally recommend the Visual Studio also. I used to use lcc, but had problems with it.

The IDE ain't so bad either especially with the Visual Assist.



Link to comment

hey dont get me wrong; i enjoy using the Visual Studio C++ and C# stuff from MCSFT... I really do... The IDE makes it easy.. but the download install time is out of control for some of these IDE..  when i can use command line compiling for C# and use a free small portable C++ IDE... 


besides years of doing ASM with TASM32 and C++ with Dev-C (even ASM a lil with Dev-C) , some habits die hard

Edited by JMC31337
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...