Relative Content

Tag Archive for c++linuxgccbazel

How to share a function in c++ on linux

I have following issue. I have two shared libs (using cc_binary) and one executable.
If I run main, I’d expect to show same values in printvs independednfrom where I call it. But I get, a 0 when calling from main. I don’t understand why, because the vs() symbols should be located in lib1.so, wich sould be shared to every consumer. Could some óne explain what’s wrong?