Problem linking after #include "TCanvas"

The following code

#include "TPad.h" 
void main() {}`

compiles runs using the command
$ gcc a.cc $(root-config --cflags --glibs) && ./a.out

However, the code

#include "TCanvas.h"
void main() {}

Gives the linking message:

/usr/bin/ld: /tmp/cczD2HE7.o: undefined reference to symbol '_ZTVN10__cxxabiv117__class_type_infoE@@CXXABI_1.3'
//usr/lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

Any ideas what’s wrong?
–thanks, Chris


ROOT Version: ROOT 6.12/04
Platform: Ubuntu 14.04 LTS (Trusty Tahr) userspace on WSL kernel w/ Xming
Compiler: gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)


Problem solved: you need to use ‘g++’ .

1 Like

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