www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Linking external *.lib files

reply Jolly James <j.j jmail.com> writes:
Let's assume, I have the following 2 dub packages:

pkgBASE:
     source/
     lib/

pkgAPP:
Jun 16
parent reply Jolly James <j.j jmail.com> writes:
Let's assume, I have the following 2 dub packages:


pkgBASE:
     (depends on public DUB package)
     source/
     lib/
pkgAPP:
     (depends on pkgBASE)
     source/


I have added pkgBASE via add-path. This wasn't a problem at all.

Unfortunately, the public DUB package requires to be linked with 
the libs from pkgBASE/lib. What do I have to add to pkgBASE's 
dub.json?
Jun 16
parent reply Jolly James <j.j jmail.com> writes:
On Saturday, 17 June 2017 at 00:09:41 UTC, Jolly James wrote:
 Let's assume, I have the following 2 dub packages:


 pkgBASE:
     (depends on public DUB package)
     source/
     lib/
 pkgAPP:
     (depends on pkgBASE)
     source/


 I have added pkgBASE via add-path. This wasn't a problem at all.

 Unfortunately, the public DUB package requires to be linked 
 with the libs from pkgBASE/lib. What do I have to add to 
 pkgBASE's dub.json?
Side-note: the lib/ should not be moved for portability reasons if this is possible
Jun 16
parent reply Jolly James <j.j jmail.com> writes:
On Saturday, 17 June 2017 at 00:33:01 UTC, Jolly James wrote:
 On Saturday, 17 June 2017 at 00:09:41 UTC, Jolly James wrote:
 Let's assume, I have the following 2 dub packages:


 pkgBASE:
     (depends on public DUB package)
     source/
     lib/
 pkgAPP:
     (depends on pkgBASE)
     source/


 I have added pkgBASE via add-path. This wasn't a problem at 
 all.

 Unfortunately, the public DUB package requires to be linked 
 with the libs from pkgBASE/lib. What do I have to add to 
 pkgBASE's dub.json?
Side-note: the lib/ should not be moved for portability reasons if this is possible
My bad solution: "lflags": [ "-Llib\\" ], but this requires the lib folder to be part of pkgAPP, not pkgBASE where I would like to have it. Does anyone have an idea?
Jun 16
next sibling parent reply Jolly James <j.j jmail.com> writes:
*push*
Jun 21
parent bachmeier <no spam.net> writes:
On Wednesday, 21 June 2017 at 13:07:31 UTC, Jolly James wrote:
 *push*
Have you asked on the Dub forum? http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/
Jun 21
prev sibling parent Mike Parker <aldacron gmail.com> writes:
On Saturday, 17 June 2017 at 00:37:18 UTC, Jolly James wrote:

 Unfortunately, the public DUB package requires to be linked 
 with the libs from pkgBASE/lib. What do I have to add to 
 pkgBASE's dub.json?
Side-note: the lib/ should not be moved for portability reasons if this is possible
My bad solution: "lflags": [ "-Llib\\" ], but this requires the lib folder to be part of pkgAPP, not pkgBASE where I would like to have it. Does anyone have an idea?
Replace the lflags directive with this in the pkgBase dub.json: "libs": [ "$PACKAGE_DIR/libs/foo" ]
Jun 21