This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

problem compiling static const char arrays in 2.95.3 (attached code)


I 'm having a problem compiling (actually, linking) a very short program in
g++ 2.95.3

				#include <stdio.h>

				class A
				{
				  public:
				    static const char name[] = "ME";

				};


				main()
				{
				    printf("I AM %s",A::name);
				}


GCC: 	Reading specs from
/u1/edeno/latest-gcc/target/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.3/specs
	gcc version 2.95.3 19991030 (prerelease)
System Type:  Solaris 2.5.1
Output: 
			Undefined                       first referenced
			 symbol                             in file
			A::name
/var/tmp/ccpupQ7o.o
			ld: fatal: Symbol referencing errors. No output
written to a.out
			collect2: ld returned 1 exit status
Options: -fsquangle
 <<simple.ii>> the preprocessed code


       

simple.ii


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]