Michael
Michael

Reputation: 45

C lib file dependency conflicts

So I'm confused about how lib files work, I would prefer to use all lib files and no dlls but am concerned about potential conflicts of a specific type.

Say you have a program that depends on lib files a1 and a2, and lib file a1 depends on lib file b1 and lib file a2 depends on lib file b2, but b1 and b2 conflict. Is this a problem?

In more general terms, is every function in a lib file public, even the included libs, or are its included libs private in some manner?

Upvotes: 1

Views: 92

Answers (1)

Vivian De Smedt
Vivian De Smedt

Reputation: 1029

Yes it is.

If the conflict is that b1 and b2 have fiction with the same name and different behavior the linker will pick one of them (the first) and a2 will be served with the wrong one.

Upvotes: 1

Related Questions