# KERNEL32.DLL fatal error while using ROOT 6 & Windows10

**URL:** <https://root-forum.cern.ch/t/kernel32-dll-fatal-error-while-using-root-6-windows10/35405>\
**Category:** ROOT\
**Created:** [July 30, 2019, 6:35am UTC](https://root-forum.cern.ch/t/kernel32-dll-fatal-error-while-using-root-6-windows10/35405 "2019-07-30T06:35:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MatteoC87](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/matteoc87/32/16565_2.png) [@MatteoC87](https://root-forum.cern.ch/u/MatteoC87)\
**Post date:** [July 30, 2019, 6:35am UTC](https://root-forum.cern.ch/t/kernel32-dll-fatal-error-while-using-root-6-windows10/35405/1 "2019-07-30T06:35:17Z")

</div>

Hi All,

I am currently facing a problem when compiling code with ROOT 6.18/00 (debug binary). Every time I try to compile a macro or a set of libraries, I get the following error:

```auto
C:\WINDOWS\System32\KERNEL32.DLL : fatal error LNK1107: invalid or corrupt file: cannot read at 0x2E0
Error in <ACLiC>: Compilation failed!

```

I compile using a x86 Native Tools Command Prompt through the command .L macro.cpp++  
I get the same error if I compile from Visual Studio directly or calling the VCVARSALL.BAT from a normal cmd prompt.

Just to be sure I built again root in my PC (using cmake) and also in this case I get the same error.  
My Visual Studio configuration is the following:

- MSVC v142 - VS2019 C++ x64/x86 build tools
- Windows 10 SDK (10.0.18362.0)
- Windows 10 SDK (10.0.17134.0)
- Just-In-Time debugger
- C++ profiling tools
- C++ ATL for v142 build tools (x86 & x64)
- Test Adapter for Boost.Test
- Test Adapter for Google Test
- IntelliCode
- C++ Clang tools for Windows (8.0.0 - x64/x86)

Searching in the forum I have found other two posts with similar error:

> [@Problem when compiling macros with root\_v6.14 under Windows 10](https://root-forum.cern.ch/t/problem-when-compiling-macros-with-root-v6-14-under-windows-10/29519):
>
> Hi everyone, After installing the windows version of root 6.14 on my PC, I tried to compile one of my macro files, but I ran into a strange error message: C:\WINDOWS\System32\KERNEL32.DLL : fatal error LNK1107: invalid or corrupt file: cannot read at location 0x2F0.Error in ACLiC: Compilation failed! If I only use the interpreter mode, the macro runs fine. Has anyone seen such error message in relation with root 6.14 on windows? Thanks, Marcell ROOT Version: 6.14 Platform: Windows 10 C…

> [@Migrating from ROOT 5 to ROOT 6 in Windows 10](https://root-forum.cern.ch/t/migrating-from-root-5-to-root-6-in-windows-10/32183/24):
>
> I don’t know, it works for me… which version of ROOT are you trying to build?

I would be so grateful for any help! 🙂

Thanks a lot,  
Matteo

* * *

\_ROOT Version:6.18/00  
_Platform:_ Windows 10  
_Compiler:_ Not Provided

* * *

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [July 30, 2019, 6:44am UTC](https://root-forum.cern.ch/t/kernel32-dll-fatal-error-while-using-root-6-windows10/35405/2 "2019-07-30T06:44:39Z")

</div>

Hi Matteo,

I have seen this error a couple of times. I’ll try to reproduce it and fix it asap.

Cheers, Bertrand.

---

<div class="post-metadata">

**Author:** ![MatteoC87](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/matteoc87/32/16565_2.png) [@MatteoC87](https://root-forum.cern.ch/u/MatteoC87)\
**Post date:** [July 30, 2019, 8:18pm UTC](https://root-forum.cern.ch/t/kernel32-dll-fatal-error-while-using-root-6-windows10/35405/3 "2019-07-30T20:18:13Z")

</div>

Hi Bertrand,

thanks! Looking forward to use ROOT again,

Cheers,  
Matteo

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [July 31, 2019, 2:22pm UTC](https://root-forum.cern.ch/t/kernel32-dll-fatal-error-while-using-root-6-windows10/35405/4 "2019-07-31T14:22:51Z")

</div>

Note that you can compile your code normally, with the regular `cl.exe` (from a `x86 Native Tools Command Prompt for VS 2019`)

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [August 15, 2019, 6:21am UTC](https://root-forum.cern.ch/t/kernel32-dll-fatal-error-while-using-root-6-windows10/35405/6 "2019-08-15T06:21:57Z")

</div>

Closed on August 15, 2019, 6:21am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
