Undefined reference in RE03DetectorConstruction when adding Physics List

Hello everyone,

I am working on a Geant4 simulation project using the RE03 example. My goal is to calculate the transmission through a geometry where a cube is subdivided into smaller cubes, and at the center of each sub-cube, there is a sphere.

However, I keep encountering the following error during the linking phase when trying to add a Physics List to my project:
Using global libraries …
Linking RE03
/usr/bin/ld : /home/amina/geant4_workdir/tmp/Linux-g++/RE03/libRE03.so : undefined reference to ‘RE03DetectorConstruction::GetMaterial()’
/usr/bin/ld : /home/amina/geant4_workdir/tmp/Linux-g++/RE03/libRE03.so : undefined reference to ‘RE03DetectorConstruction::GetSize()’
collect2: error: ld returned 1 exit status
make: *** [/home/amina/geant/geant4-v11.2.1-install/share/Geant4/geant4make/config/binmake.gmk:417 : /home/amina/geant4_workdir/bin/Linux-g++/RE03] Error 1
Could anyone point me towards the cause of this undefined reference and how I might fix it?

Thank you in advance for your help.
Amina,

These aren’t in the implementation in 11.2.1, so I assume you’ve declared these functions, but not defined them. What code have you added to implement/use these in RE03DetectorConstruction.hh and ``RE03DetectorConstruction.cc`?