# Compiling Macro Error Linking Issue

**URL:** <https://root-forum.cern.ch/t/compiling-macro-error-linking-issue/48706>\
**Category:** Newbie\
**Created:** [February 7, 2022, 7:32pm UTC](https://root-forum.cern.ch/t/compiling-macro-error-linking-issue/48706 "2022-02-07T19:32:29Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bisness36](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@Bisness36](https://root-forum.cern.ch/u/Bisness36)\
**Post date:** [February 7, 2022, 7:32pm UTC](https://root-forum.cern.ch/t/compiling-macro-error-linking-issue/48706/1 "2022-02-07T19:32:29Z")

</div>

Hi I recently downloaded the ROOT 6.24.06 Windows binary .exe with a Visual Studio 2022 as my compiler. I am new to both Root and c++ in general attempting to compile a macro that had been sent to me by others who had been using it on a different version of root and works with both Linux and MacOS.

In the root command line I typed .L dig.C+O which is in my macros folder within ROOT. As a new user I cannot upload a snip of the error but I will type out the output text surrounding the fatal error to start.

note: ‘C:/root\_v6.24.06/include/RtypesCore.h’ included multiple times, additional include site here  
fatal error: cannot open file ‘input\_line\_3’: no such file or directory  
C:/root\_v6.24.06/include\Rtypes.h:23:10: note: ‘C:/root\_v6.24.06/include/RtypesCore.h’ included multiple times, additional include site here “RtypesCore.h”

I apologize that this is an inefficient way of showing the full error text, I could upload the full output message if need be including the non fatal errors. I’m not exactly sure what ‘input\_line\_3’ is referring to and I am unsure at the switch between / and \ in the fatal error statement.

_ROOT Version:_ 6.24.06  
_Platform:_ Windows  
_Compiler:_ Visual Studio Community 2022

* * *

---

<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:** [February 8, 2022, 7:27am UTC](https://root-forum.cern.ch/t/compiling-macro-error-linking-issue/48706/2 "2022-02-08T07:27:37Z")

</div>

Welcome to the ROOT Forum!  
First, you might encounter some issues with a different version of Visual Studio than the one used to build the binary you downloaded, but let’s try nevertheless. I suppose you started ROOT from a `x86 Native Tools Command Prompt for VS 2022` ?

> [@Bisness36](#):
>
> As a new user I cannot upload a snip of the error but I will type out the output text surrounding the fatal error to start.

Well, you can copy & paste the text of the error message in your post. Anyway, can you run any of the ROOT tutorials? First interpreted (e.g. `.x hsimple.C`) and then compiled with ACLiC (e.g. `.x hsimple.C+`)

---

<div class="post-metadata">

**Author:** ![Bisness36](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@Bisness36](https://root-forum.cern.ch/u/Bisness36)\
**Post date:** [February 8, 2022, 10:17pm UTC](https://root-forum.cern.ch/t/compiling-macro-error-linking-issue/48706/3 "2022-02-08T22:17:19Z")

</div>

I have started root both through the desktop shortcut which pulls up a command prompt and starting root from a VS 2022 command prompt (not 100% about the x86 Native Tools part)

Both methods I can run the .x hsimple.c but cannot compile and get the same error as I did when trying to compile other macros.

---

<div class="post-metadata">

**Author:** ![Bisness36](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@Bisness36](https://root-forum.cern.ch/u/Bisness36)\
**Post date:** [February 8, 2022, 10:23pm UTC](https://root-forum.cern.ch/t/compiling-macro-error-linking-issue/48706/6 "2022-02-08T22:23:53Z")

</div>

Here is the my input of the macro working and then the input and outputs of the compiler error when I tried to compile it.

\*root [0] .x hsimple.c  
\*hsimple : Real Time = 0.57 seconds Cpu Time = 0.56 seconds  
\*(TFile \*) 0xcc65bf0  
\*root [1] .x hsimple.c+  
\*Info in : script has already been loaded in interpreted mode  
\*Info in : unloading C:\root\_v6.24.06\macros\hsimple.c and compiling it  
\*Info in _: creating shared library C:/root\_v6.24.06/macros/hsimple\_c.dll  
\*In file included from input\_line\_3:2:  
\*In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include\string:11:  
\*In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include\xstring:14:  
\*In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include\xmemory:16:  
\*In file included from C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include\xutility:15:  
\*C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include\utility:131:9: error: expected member name or ‘;’ after declaration specifiers  
!conjunction\_v\<\_Is\_implicitly\_default\_constructible\<\_Uty1\>, \_Is\_implicitly\_default\_constructible\<\_Uty2\>\>)  
^  
\*C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include\utility:131:9: error: expected ‘)’  
\*C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include\utility:130:23: note: to match this ‘(’  
constexpr explicit(  
^  
\*C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include\utility:217:24: error: expected member name or ‘;’ after declaration specifiers  
constexpr explicit(!conjunction\_v\<is\_convertible\<const \_Other1&, \_Ty1\>, is\_convertible\<const \_Other2&, \_Ty2\>\>)  
~~~~~~~~~~~~~~~~~~ ^  
\*C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include\utility:217:24: error: expected ‘)’  
\*C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.30.30705\include\utility:217:23: note: to match this ‘(’  
constexpr explicit(!conjunction\_v\<is\_convertible\<const \_Other1&, \_Ty1\>, is\_convertible\<const Other2&, Ty2\>\>)  
^  
\*In file included from input\_line\_4:2:  
\*In file included from C:/root\_v6.24.06/include\Rtypes.h:23:  
\*C:/root\_v6.24.06/include/RtypesCore.h:91:17: error: redefinition of ‘kTRUE’  
const Bool\_t kTRUE = true;  
^  
\*note: ‘C:/root\_v6.24.06/include/RtypesCore.h’ included multiple times, additional include site here  
fatal error: cannot open file ‘input\_line\_3’: no such file or directory  
\*C:/root\_v6.24.06/include\Rtypes.h:23:10: note: ‘C:/root\_v6.24.06/include/RtypesCore.h’ included multiple times, additional include site here  
 #include “RtypesCore.h”  
^  
\*C:/root\_v6.24.06/include/RtypesCore.h:91:17: note: unguarded header; consider using #ifdef guards or #pragma once  
const Bool\_t kTRUE = true;  
^  
 Error in : Executing 'C:\root\_v6.24.06\bin\rootcling -v0 “–lib-list-prefix=C:\root\_v6.24.06\macros\hsimple\_c\_ACLiC\_map” -f "C:\root\_v6.24.06\macros\hsimple\_c\_ACLiC\_dict.cxx" -rml hsimple\_c -rmf \*“C:\root\_v6.24.06\macros\hsimple\_c.rootmap” -DR\_\_ACLIC\_ROOTMAP -I%ROOTSYS%\include -D\_\_ACLIC \*“C:/root\_v6.24.06/macros/hsimple.c” “C:\root\_v6.24.06\macros\hsimple\_c\_ACLiC\_linkdef.h”’ failed!  
\*root [2]_

---

<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:** [February 9, 2022, 6:57am UTC](https://root-forum.cern.ch/t/compiling-macro-error-linking-issue/48706/7 "2022-02-09T06:57:38Z")

</div>

OK, so this is because ROOT v6.24.06 has been build with a too old and incompatible version of Visual Studio. You might consider downloading a [nightly build](https://root.cern/download/nightly/), or wait for the upcoming version 6.26.00. I just tested the latest nightly (`root_v6.27.01.win32.vc.zip`) built with VS 2019, running with VS2022 and it works just fine.

```auto
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.0.5
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x86'

C:\Users\sftnight>cd Downloads\root

C:\Users\sftnight\Downloads\root>bin\thisroot.bat

C:\Users\sftnight\Downloads\root>cd tutorials

C:\Users\sftnight\Downloads\root\tutorials>root -l

Welcome to the ROOT tutorials

Type ".x demos.C" to get a toolbar from which to execute the demos

Type ".x demoshelp.C" to see the help window

==> Many tutorials use the file hsimple.root produced by hsimple.C
==> It is recommended to execute hsimple.C before any other script

root [0] .x hsimple.C+
Info in <TWinNTSystem::ACLiC>: creating shared library C:/Users/sftnight/Downloads/root/tutorials/hsimple_C.dll
hsimple_C_ACLiC_dict.cxx
   Creating library C:/Users/sftnight/Downloads/root/tutorials\hsimple_C.lib and object C:/Users/sftnight/Downloads/root/tutorials\hsimple_C.exp
hsimple_C_ACLiC_dict.cxx
   Creating library C:/Users/sftnight/Downloads/root/tutorials\hsimple_C.lib and object C:/Users/sftnight/Downloads/root/tutorials\hsimple_C.exp
hsimple : Real Time = 1.34 seconds Cpu Time = 1.28 seconds
(TFile *) 0x7495ce0
root [1]

```

---

<div class="post-metadata">

**Author:** ![Bisness36](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@Bisness36](https://root-forum.cern.ch/u/Bisness36)\
**Post date:** [February 18, 2022, 7:12pm UTC](https://root-forum.cern.ch/t/compiling-macro-error-linking-issue/48706/8 "2022-02-18T19:12:04Z")

</div>

Hi Thanks for offering this help this seemed to work, I can now compile both the hsimple and the macro that was supplied to me.

A new issue arose with this as I try to use a function within it that pulls up a bunch of plots. After a time I get a message that I do not have enough memory (which is odd to me as I have 32Gb ram and previous computers had successfully used this function without memory issues). Should I open this up in a different thread or stay here?

---

<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:** [February 19, 2022, 8:19pm UTC](https://root-forum.cern.ch/t/compiling-macro-error-linking-issue/48706/9 "2022-02-19T20:19:08Z")

</div>

Please create a a new topic
