www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Resolve dub dependency

reply JN <666total wp.pl> writes:
I am trying to use bindbc-sdl and bindbc-wgpu at the same time. 
The error is:

Unresolvable dependencies to package bindbc-loader:
   bindbc-sdl 0.19.1 depends on bindbc-loader ~>0.3.0
   bindbc-sdl 0.19.1 depends on bindbc-loader ~>0.3.0
   bindbc-wgpu 0.1.0-alpha8 depends on bindbc-loader ~>0.2.1

What is the cleanest way to resolve this? I don't understand why 
can't -sdl and -wgpu use different versions of the loader library.
Sep 21 2020
parent reply Paul Backus <snarwin gmail.com> writes:
On Monday, 21 September 2020 at 19:16:17 UTC, JN wrote:
 I am trying to use bindbc-sdl and bindbc-wgpu at the same time. 
 The error is:

 Unresolvable dependencies to package bindbc-loader:
   bindbc-sdl 0.19.1 depends on bindbc-loader ~>0.3.0
   bindbc-sdl 0.19.1 depends on bindbc-loader ~>0.3.0
   bindbc-wgpu 0.1.0-alpha8 depends on bindbc-loader ~>0.2.1

 What is the cleanest way to resolve this? I don't understand 
 why can't -sdl and -wgpu use different versions of the loader 
 library.
You can't use different versions of a library in the same library in the same program because library version isn't included in name mangling, so you'll get link errors for having multiple definitions of the same symbol.
Sep 21 2020
parent JN <666total wp.pl> writes:
On Monday, 21 September 2020 at 19:38:12 UTC, Paul Backus wrote:
 On Monday, 21 September 2020 at 19:16:17 UTC, JN wrote:
 I am trying to use bindbc-sdl and bindbc-wgpu at the same 
 time. The error is:

 Unresolvable dependencies to package bindbc-loader:
   bindbc-sdl 0.19.1 depends on bindbc-loader ~>0.3.0
   bindbc-sdl 0.19.1 depends on bindbc-loader ~>0.3.0
   bindbc-wgpu 0.1.0-alpha8 depends on bindbc-loader ~>0.2.1

 What is the cleanest way to resolve this? I don't understand 
 why can't -sdl and -wgpu use different versions of the loader 
 library.
You can't use different versions of a library in the same library in the same program because library version isn't included in name mangling, so you'll get link errors for having multiple definitions of the same symbol.
Ahh ok, that makes sense. I patched bindbc-wgpu locally to use loader ~>0.3.0 and it's working now.
Sep 21 2020