www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - When creating a binding package in the dub repository do you specify

reply "Gary Willoughby" <dev nomad.so> writes:
When creating a binding package in the dub repository do you 
specify the link flags or leave that up to the developer using 
the library?

For example, each package in the dub repository has a 
package.json which describes exactly how the package should build 
and link, etc. If the package only contained bindings to a C 
library would you add the flag necessary to link against it there 
or leave the responsibility for linking for the client 
application that uses your binding?
Jan 10 2014
parent "Kelet" <kelethunter gmail.com> writes:
On Friday, 10 January 2014 at 18:44:22 UTC, Gary Willoughby wrote:
 When creating a binding package in the dub repository do you 
 specify the link flags or leave that up to the developer using 
 the library?

 For example, each package in the dub repository has a 
 package.json which describes exactly how the package should 
 build and link, etc. If the package only contained bindings to 
 a C library would you add the flag necessary to link against it 
 there or leave the responsibility for linking for the client 
 application that uses your binding?
Include the link flags. If for some reason you can think of a case that might happen where the link flags may be erroneous or unnecessary, have two configurations: one which has the link flags, and one which does not. Regards, Kelet
Jan 10 2014