Thread overview
dub, copyFiles and linux
Mar 31, 2016
Andre
Mar 31, 2016
Andre
Mar 31, 2016
Andre
March 31, 2016
Hi,

I created a library which uses some shared objects. The dub.json looks like this:
{
	"name": "sec",
	"configurations": [
		{
			"name": "debug",
			"targetType": "library",
			"copyFiles":["lib/libssoext.so","lib/librypto.so"],
			"libs-posix": ["ssoext"],
			"lflags":["-L./.","-rpath=./."],
		}
	]
}
Within my project folder, there is a folder lib with the 2 so files.

Within my application project, I use this library. The dub.sdl looks like this:
name "demo"
targetName "app"
dependency "sec" version=">=0.0.1"

I would expect, while dub is compiling my application project, the 2 libs are
copied to my application folder. But that is not working.

I can't see why it is working with vibe-d projects (openssl libraries copied to application folder) but not for my project. There is no console output "copying files for..." while using dub for my application project.
What is wrong?

Kind regards
André
March 31, 2016
On Thursday, 31 March 2016 at 04:57:01 UTC, Andre wrote:

> I can't see why it is working with vibe-d projects (openssl libraries copied to application folder) but not for my project. There is no console output "copying files for..." while using dub for my application project.
> What is wrong?
>
> Kind regards
> André

OK, I see copying files is triggered after the linking process.
That is bad...
March 31, 2016
OK solved;)
Shared libraries doesn't need to be mentioned in libs section in dub.
Therefore copying after the linking is correct and is working fine.

Kind regards
André