ROOT::Math::TranslationZYX Compiling Problem

ROOT Version: 6.24/02
Platform: Ubuntu20
Compiler: gcc

I try to compile code containing RotationZYX class.
Include files can be found, but it can’t find src anyway. while other ROOT class like TFile, TH1 work well.
The error when I compiling is like below:

Module.o: In function `ROOT::Math::RotationZYX::RotationZYX(double, double, double)':
/usr/include/root/Math/GenVector/RotationZYX.h:80: undefined reference to `ROOT::Math::RotationZYX::Rectify()'

My makefile work like this:

CXX = g++
LD  = g++
CFLAGS = -Wall -g -std=c++11

CERN = /cvmfs/ 
INCS = /usr/include/root   $(PWD)/tclap-1.0.5/include/ .
LIBS = $(CERN)/pro/lib
%.o: %.cpp
	@echo "*"
	@echo "* compile "$@
	@echo "*"
	$(CXX) $(CFLAGS) $(addprefix -I, $(INCS)) -c $< -o $@

knossos: knossos.o Millepede.o MilleTool.o TrackStore.o jobParams.o myAlg.o fun.o Module.o
	@echo "Build knossos"
	$(LD) $^ $(shell $(ROOTSYS)/bin/root-config --libs) -lGui $(addprefix -L, $(LIBS)) -lmathlib -lkernlib  -lm -o $@

Best wishes

Try to add (before or after “-lGui”): -lGenVector

1 Like

It work, thanks

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