My question is an extension of this question
I want to link to 2 libraries - fooand barprefers static for foo and dynamic for bar. If i use
g++ -static -lfoo -lbar
he is trying to find static archives for foo and bar. When I change the team to
g++ -Wl,-Bstatic -lfoo -Wl,-Bdynamic -lbar -Wl,--as-needed
according to the SO question above, this is the error I get:
ld: unknown option: -Bstatic
Update: I am using OSX if that matters
source
share