Hello, I got a strange link problem; here are the simplest files showing the error:
a.h:: #include <utility> class a{ public: typedef int perm; static const perm PERM_NONE = 0; a(); private: std::pair<int, perm> aaa; }; a.cpp:: #include "a.h" a::a() : aaa(0,PERM_NONE) { } main () { } Compiling with g++ (GCC) 3.3.5 (Debian 1:3.3.5-13) I get:: $ g++ a.cpp /tmp/ccKKUXg8.o: In function `a::a[not-in-charge]()':a.cpp:(.text+0xa): undefined reference to `a::PERM_NONE' /tmp/ccKKUXg8.o: In function `a::a[in-charge]()':a.cpp:(.text+0x34): undefined reference to `a::PERM_NONE' collect2: ld returned 1 exit status The file compiles correctly, the error shows up only when linking. What could it possibly be? Thanks for any help! Arcimboldo _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus