CINT (ROOT v5.30) does not compile class with static const members

From: Neal Gauvin <Neal.Gauvin_at_unige.ch>
Date: Wed, 25 Apr 2012 13:46:27 +0200


Hi,

I wrote a class, which contains a static const member. The class compiles finely with g++, but CINT fails to compile it.

Info in <TUnixSystem::ACLiC>: creating shared library
/home/gauvin/Polar/europe_svn/trunk/include/./test_C.so
dlopen error: /home/gauvin/Polar/europe_svn/trunk/include/./test_C.so: undefined symbol: _ZN4test10common_limE
Load Error: Failed to load Dynamic link library
/home/gauvin/Polar/europe_svn/trunk/include/./test_C.so
/usr/lib/gcc/x86_64-redhat-linux/4.6.3/../../../../lib64/crt1.o: In
function `_start':
(.text+0x20): undefined reference to `main'
/home/gauvin/Polar/europe_svn/trunk/include/test_C_ACLiC_dict.o: In
function `G__setup_memvartest()':
test_C_ACLiC_dict.cxx:(.text+0xde3): undefined reference to `test::common_lim'
collect2: ld a retourné 1 code d'état d'exécution

You can find the demo class in attachment. I am using ROOT version 5.30.
The same code is found to work on ROOT version v5.26

Does somebody have any Idea what goes wrong ?

Thanks in advance,

Neal

-- 
_______________________________________________

Dr. Neal Gauvin
E-mail neal.gauvin_at_a3.epfl.ch
-----------------------------------------------
Data Centre for Astrophysics (ISDC)
Chemin d'Ecogia 16
CH-1290 Versoix
Phone : +41 22 379 2108
_______________________________________________


  • text/x-c++src attachment: test.C
  • text/x-chdr attachment: test.h
Received on Wed Apr 25 2012 - 13:46:35 CEST

This archive was generated by hypermail 2.2.0 : Wed Apr 25 2012 - 17:50:02 CEST