Post by Tim RobertsPost by Benjamin B.Post by Angel TsankovMay I specify a relative or an absolute path in the pragma comment lib
directive? If so, how?
What's that "feature" good for anyway?
Has linking suddenly become part of application logic?
Why not? If I'm calling APIs from my_dll.dll in a particular source
module, why shouldn't that C module embed the library requirement? Why
should I have to embed that knowledge separately from the module?
You're saying it yourself: It's embedding it. It's (kind of) hiding it.
It's not visible at first glance.
Post by Tim RobertsPost by Benjamin B.How about a separation of concerns?
Me, I'm using linker arguments in the project settings.
And when you copy that source file into another project, you will have to
build it and get a linker error before you remember "oh, that's right, I
need to add my_dll.lib to the project settings."
Portability is an issue here, I think.
How can one assume that library names are the same on different platforms?
Or, to be more general: What's being passed to the linker is an
argument, no matter if that's a library or an option. How can one assume
that a different linker accepts the same arguments?
Besides, my personal opinion is that concerns should be and have to be
separated. And linking is a task that has absolutely nothing to do with
my program logic.
One may even sometimes want to use a different library, or the same
library in a different version, implementing the same interface.
And, yes, one may get a linker error sometimes. That's exactly what
linker errors are for. To make you wonder if you have that library, if
you have it in the version which you want. Costs 10 seconds and assures
that you're doing the right thing.
Cheers
Benjamin