mercredi 11 septembre 2019

initializing a vector c++11 in a library

Initializing a global vector variable like this works if it is defined in main.cpp program. However, if I do the same in a lib.a file, this is not initialized .

My lib is compiled with c++11 flags

std::vector <std::string> Paths_ { "/numalliance/MACHINE/IMAGES" }; 

Is there some specific initializer in case of declaration in a library ?

Aucun commentaire:

Enregistrer un commentaire