V
Vijay Bajwa
I declared a static std::map<string, int> in one.cpp at the module
level. This is only used inside the file and I did it to avoid global
namespace pollution
The file one.o goes into the library archive mylib.a
Then when I try to compile file two.cpp, which links to mylib.a, the
linker spits out incomprehensible messages about undefined symbols. I
understood them enough to know that it's complaining about methods of
the map class being undefined.
Any relief here? I saw some esoteric discussions on C++ FAQ Lite, but
missed the point.
Thanks a lot for your kind responses!
Vijay
level. This is only used inside the file and I did it to avoid global
namespace pollution
The file one.o goes into the library archive mylib.a
Then when I try to compile file two.cpp, which links to mylib.a, the
linker spits out incomprehensible messages about undefined symbols. I
understood them enough to know that it's complaining about methods of
the map class being undefined.
Any relief here? I saw some esoteric discussions on C++ FAQ Lite, but
missed the point.
Thanks a lot for your kind responses!
Vijay