Problem with static in templates

Johannus Noordanus
Wed Jan 6 07:10:00 GMT 1999

When compiling the program (see attachment), the following
loader error occurred:

AVL/TEST > g++
/tmp/cca296381.o: In function `X<int>::X(int)':
/tmp/cca296381.o(.X<int>::gnu.linkonce.t.(int)+0x7): undefined reference
to `X<int>::s'
collect2: ld returned 1 exit status

It seems that the use of static variables within template classes is not

I hope you will look into this problem.

Johannes Noordanus                                 Software Engineer
voice:  +31 33 455 85 84                           Tasking Software BV
fax:    +31 33 455 86 12                           Plotterweg 31
email:             3821 BB  Amersfoort
WWW:                     The Netherlands
------------> Quality Development Tools Worldwide <-------------------

More information about the Gcc-bugs mailing list