When compiling a library that uses ROOT6 in macOS Sierra. TGLViewer methods for x64 not found!

ROOT Version (e.g. 6.12/02):

Built for macosx64 |
| From tag v6-10-06, 19 September 2017 |

Platform, compiler:
g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.38)
Target: x86_64-apple-darwin17.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

uname -a

Darwin sphnmcd233 17.5.0 Darwin Kernel Version 17.5.0: Fri Apr 13 19:32:32 PDT 2018; root:xnu-4570.51.2~1/RELEASE_X86_64 x86_64

When compiling some libraries depending on ROOT I have the few compilation errors related to TGLViewer methods. It seems that it does not find the 64 bits version in the library.

I compiled ROOT from source for my architecture. Any idea where it could be the problem?

Here is the error I get during compilation.


Undefined symbols for architecture x86_64:
  "TGLViewer::SetGuideState(int, bool, bool, double const*)", referenced from:
      TRestEveEventViewer::DrawTab() in TRestEveEventViewer.cxx.o
  "TGLViewer::SetCurrentCamera(TGLViewer::ECameraType)", referenced from:
      TRestEveEventViewer::MultiView() in TRestEveEventViewer.cxx.o
  "TGLViewer::DoDraw(bool)", referenced from:
      TRestEveEventViewer::DrawTab() in TRestEveEventViewer.cxx.o
ld: symbol(s) not found for architecture x86_64

Just had to add -lRGL to the compilation libraries in my CMakeLists.txt

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