Examles compilation issue
Hello, I have a problem with my local machine compiling examples. I am using:
- macOS 10.14.6
- root 6.20 (recently updated, may be it was a mistake)
- clang version 11.0.0 Target: x86_64-apple-darwin18.7.0
For example compiling Gem example in Examples/Gem.
At first I have to remove -lgfortran
from LDFLAGS
as fortran libraries are builtin (as I understand), and then I have an error:
>>make gem
c++ -Wall -Wextra -Wno-long-long `root-config --cflags` -O3 -fno-common -c -I/Users/eshulga/Work/Garfield2020/garfieldpp/Include gem.C
c++ `root-config --cflags` -o gem gem.o -L/Users/eshulga/Work/Garfield2020/garfieldpp/Library -lGarfield `root-config --glibs` -lGeom -lm
Undefined symbols for architecture x86_64:
"Garfield::ViewBase::SetCanvas(TCanvas*)", referenced from:
_main in gem.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [gem] Error 1
I am not sure what can cause this.
This time during installation I have made these:
cmake -DCMAKE_INSTALL_PREFIX=../install [-DWITH_DOCS=ON] [-DWITH_EXAMPLES=ON] $GARFIELD_HOME
make -j4
make install
Dear Pere, maybe you could take a look @mato .