www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - newbie question about dub

reply "Oleg" <gaolong i.ua> writes:
Hello.
I'm developing library and want to add an examples to the same 
project. If I understand corecly, DUB allows to build a 
dependencies from another folder and use them to build a program. 
I've tried two ways - subConfigurations and subPackages. For 
example, there is subConfigurations config:

{
	"name": "dfuse",
	 "description": "FUSE D binding.",
	 "copyright": "Copyright",
  	"authors": ["Oleh"],
		
		
	"configurations": [
		{
			"name": "dfuse-lib",
			"targetType": "library",
			"targetName": "dfuse",
			"targetPath": "build/lib",
			"versions": ["trace"]
		},
		{
			"name": "dfuse-examples",
			"targetType": "executable",
			"targetPath": "build/examples",
			"versions": ["trace"],
			"importPaths": ["build/lib"],
			
			
			"libs": ["fuse"],

                         "dependencies": {
				"dfuse": ">=1.0.0"
			},
						
			"subConfigurations": {
				"dfuse": "dfuse-lib",
			}
		}
	]
}

But it throws next error:


Failed to retrieve metadata for package dfuse: Could not find 
package candidate for dfuse >=1.0.0
Could not resolve dependencies
The dependency graph could not be filled, there are unresolved 
dependencies.
The following changes will be performed:
Failure dfuse >=1.0.0, userWide
  -> issued by:
     dfuse: >=1.0.0
Error executing command build: Aborting package retrieval due to 
errors.

QUESTION: How to define the dfuse library version of I'm doing it 
wrong way?

It would be perfect if someone have same configuration 
(library+executable) and can share it.

Thanks.
May 06 2014
parent reply Mike Parker <aldacron gmail.com> writes:
On 5/6/2014 8:29 PM, Oleg wrote:
 QUESTION: How to define the dfuse library version of I'm doing it wrong
 way?
I believe you might find this thread[1] in the dub forum helpful. [1] http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/1328/
May 07 2014
parent Mike Parker <aldacron gmail.com> writes:
On 5/7/2014 10:41 PM, Mike Parker wrote:
 On 5/6/2014 8:29 PM, Oleg wrote:
 QUESTION: How to define the dfuse library version of I'm doing it wrong
 way?
I believe you might find this thread[1] in the dub forum helpful.
Sorry, wrong link. It should be: http://forum.rejectedsoftware.com/groups/rejectedsoftware.dub/thread/1458/
May 07 2014