# Seeking Assistance with Allpix2 Mesh Converter and CPP File Compilation Issue

**URL:** <https://allpix-squared-forum.web.cern.ch/t/seeking-assistance-with-allpix2-mesh-converter-and-cpp-file-compilation-issue/571>\
**Category:** Issues\
**Created:** [May 19, 2024, 6:31am UTC](https://allpix-squared-forum.web.cern.ch/t/seeking-assistance-with-allpix2-mesh-converter-and-cpp-file-compilation-issue/571 "2024-05-19T06:31:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Silvia](https://allpix-squared-forum.web.cern.ch/letter_avatar_proxy/v4/letter/s/8797f3/32.png) [@Silvia](https://allpix-squared-forum.web.cern.ch/u/Silvia)\
**Post date:** [May 19, 2024, 6:31am UTC](https://allpix-squared-forum.web.cern.ch/t/seeking-assistance-with-allpix2-mesh-converter-and-cpp-file-compilation-issue/571/1 "2024-05-19T06:31:33Z")

</div>

Hello everyone,  
I am currently working with Allpix2, and I can run simulations without any issues. However, when I try to use certain tools, particularly the Mesh Converter, I encounter difficulties.  
Firstly, I’m trying to obtain the executable for the MeshConverter.cpp file using the command g++ -o MeshConverter MeshConverter.cpp , but I’m getting an error indicating that it cannot find the file in the inclusion directory.  
In file included from /usr/local/include/ROOT/RConfig.hxx:23,  
from /usr/local/include/RtypesCore.h:23,  
from /usr/local/include/Compression.h:15,  
from /usr/local/include/TTree.h:29,  
from MeshConverter.cpp:24:  
/usr/local/include/RConfigure.h:30:4: warning: #warning “The C++ standard in this build does not match ROOT configuration (201703L); this might cause unexpected issues” [-Wcpp]  
30 | # warning “The C++ standard in this build does not match ROOT configuration (201703L); this might cause unexpected issues”  
| ^ ~~~~~~  
MeshConverter.cpp:26:10: fatal error: Eigen/Eigen: No such file or directory  
26 | #include \<Eigen/Eigen\>  
| ^ ~~~~~~~~~~~~  
compilation terminated.  
I have tried replacing the path with the complete access path:  
#include \<Math/Vector3D.h\>  
#include \<TTree.h\>  
#include \</usr/include/eigen3/Eigen/Eigen\>  
#include “/allpix-squared/include/core/config/ConfigReader.hpp”  
#include “/allpix-squared/include/core/config/Configuration.hpp”  
#include “/allpix-squared/include/core/config/exceptions.h”  
#include “/allpix-squared/include/core/module/ThreadPool.hpp”  
#include “/allpix-squared/include/core/utils/log.h”  
#include “/allpix-squared/include/tools/units.h”  
But I still face the same problem:  
In file included from /usr/local/include/ROOT/RConfig.hxx:23,  
from /usr/local/include/RtypesCore.h:23,  
from /usr/local/include/Compression.h:15,  
from /usr/local/include/TTree.h:29,  
from MeshConverter.cpp:24:  
/usr/local/include/RConfigure.h:30:4: warning: #warning “The C++ standard in this build does not match ROOT configuration (201703L); this might cause unexpected issues” [-Wcpp]  
30 | # warning “The C++ standard in this build does not match ROOT configuration (201703L); this might cause unexpected issues”  
| ^ ~~~~~~  
In file included from /allpix-squared/include/core/config/ConfigReader.hpp:22,  
from MeshConverter.cpp:28:  
/allpix-squared/include/core/config/Configuration.hpp:24:10: fatal error: core/config/exceptions.h: No such file or directory  
24 | #include “core/config/exceptions.h”  
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~  
compilation terminated.  
Could you please assist me with this issue?

Thank you in advance for your help!

---

<div class="post-metadata">

**Author:** ![simonspa](https://allpix-squared-forum.web.cern.ch/user_avatar/allpix-squared-forum.web.cern.ch/simonspa/32/597_2.png) [@simonspa](https://allpix-squared-forum.web.cern.ch/u/simonspa)\
**Post date:** [May 19, 2024, 8:54am UTC](https://allpix-squared-forum.web.cern.ch/t/seeking-assistance-with-allpix2-mesh-converter-and-cpp-file-compilation-issue/571/2 "2024-05-19T08:54:33Z")

</div>

Hi @Silvia

I’d be glad to hello you out! Could you provide some additional information on how exactly you installed Allpix Squared and the dependencies (ROOT, Geant4)?

What machine are you running on? Your laptop or some computing clusters?

Cheers  
Simon

---

<div class="post-metadata">

**Author:** ![Silvia](https://allpix-squared-forum.web.cern.ch/letter_avatar_proxy/v4/letter/s/8797f3/32.png) [@Silvia](https://allpix-squared-forum.web.cern.ch/u/Silvia)\
**Post date:** [May 19, 2024, 9:39am UTC](https://allpix-squared-forum.web.cern.ch/t/seeking-assistance-with-allpix2-mesh-converter-and-cpp-file-compilation-issue/571/3 "2024-05-19T09:39:33Z")

</div>

Hi Simon,  
Thank you for your reply! I am working on a computing station running Ubuntu 20.04. Here’s how I installed ROOT, Geant4, and Allpix Squared: For ROOT installation:

```auto
mkdir root/
cd root/
wget -c https://root.cern/download/root_v6.28.00.source.tar.gz
tar -xzvf root_v6.28.00.source.tar.gz
cd root_v6.28.00
mkdir build-root
cd build-root
cmake .. \
  -DCMAKE_CXX_STANDARD=17
make
make install                          

```

For Geant4 installation:

```auto
mkdir geant4              
cd geant4/
wget -c http://cern.ch/geant4-data/releases/geant4-v11.2.1.tar.gz
tar -zxf geant4-v11.2.1.tar.gz
cd geant4-v11.2.1
mkdir build
mkdir install
cd build
cmake .. \
  -DCMAKE_INSTALL_PREFIX=/geant4/geant4-v11.2.1/install \
  -DGEANT4_INSTALL_DATA=ON \
  -DGEANT4_USE_GDML=ON \
  -DGEANT4_USE_QT=ON \
  -DGEANT4_USE_XM=ON \
  -DGEANT4_USE_OPENGL_X11=ON \
  -DCMAKE_CXX_STANDARD=17 \
  -DGEANT4_BUILD_MULTITHREADED=ON \
  -DGEANT4_BUILD_BUILTIN_BACKTRACE=OFF
make
make install

```

```
                                                                                                                                              After that, I sourced ROOT and Geant4.

```

For Allpix Squared installation:

```auto
git clone https://gitlab.cern.ch/allpix-squared/allpix-squared
cd allpix-squared
mkdir build
cd build
cmake .. 
make
make install

```

---

<div class="post-metadata">

**Author:** ![Silvia](https://allpix-squared-forum.web.cern.ch/letter_avatar_proxy/v4/letter/s/8797f3/32.png) [@Silvia](https://allpix-squared-forum.web.cern.ch/u/Silvia)\
**Post date:** [May 19, 2024, 11:23pm UTC](https://allpix-squared-forum.web.cern.ch/t/seeking-assistance-with-allpix2-mesh-converter-and-cpp-file-compilation-issue/571/4 "2024-05-19T23:23:25Z")

</div>

It’s all good now. I was able to solve the problem by using the command `/allpixsquared/bin/mesh_converter` instead of just `mesh_converter` because I am working on a computing station.
