On Wed, 30 Jul 2014 13:00:34 GMT, akaDemik wrote:
Greetings.
I have dub project with
"targetType": "dynamicLibrary"
. When i rundub test
it fails with message "Error executing command test: Command failed with exit code 1".I think that the file
__test__library__.exe
actually dll, because I have a def-file (see Windows dll def-file ignored.).I try to add
"buildTypes": { "unittest": { "buildOptions": ["unittests", "debugMode", "debugInfo"], "excludedSourceFiles": ["*.def"] }
to dub.json, but still have def-file on link stage.
Thank you.
The "excludedSourceFiles" field for "buildTypes" doesn't have any effect on the package's source files (this needs to be better documented or emitted as a warning). What you can do is to create a separate "unittest" configuration:
{
"name": "my-project",
"configurations": [
{
"name": "library",
"sourceFiles": "some.def",
"targetType": "dynamicLibrary"
},
{
"name": "unittest",
"targetType": "executable"
}
]
}