The order of libraries makes error in dub
unDEFER via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Dec 5 07:27:46 PST 2016
On Monday, 5 December 2016 at 15:16:27 UTC, unDEFER wrote:
> 2) Its put to linker command at the first "libdb53d.lib
> WS2_32.lib" and AFTER that -m32mscoff. As result "cannot open
> file".
Oh, the reason was mistype. And I have found how-to hide linker
warning ("lflags-windows": ["/NODEFAULTLIB:LIBCMTD"]).
Full correct dub.json:
===================================================
{
"name": "bdb2d",
"targetName": "db",
"targetType": "library",
"description": "BerkeleyDB to D bindings.",
"authors": ["Nikolay (unDEFER) Krivchenkov"],
"homepage": "http://unde.su",
"license": "GPL-3.0 or later",
"libs-posix": ["db"],
"libs-windows-dmd": ["libdb53sd", "WS2_32"],
"dflags-windows": ["-m32mscoff"],
"lflags-windows": ["/NODEFAULTLIB:LIBCMTD"],
"subPackages": [
{
"name": "reader",
"description": "BerkeleyDB Transaction test. Reader",
"targetName": "reader",
"targetType": "executable",
"sourceFiles": ["transactions_test/reader.d"],
"targetPath": "transactions_test",
"dependencies": {
"bdb2d": "*"
}
}, {
"name": "writer",
"description": "BerkeleyDB Transaction test. Writer",
"targetName": "writer",
"targetType": "executable",
"sourceFiles": ["transactions_test/writer.d"],
"targetPath": "transactions_test",
"dependencies": {
"bdb2d": "*"
}
}
]
}
====================================================
Thank you to all, the thread is closed.
More information about the Digitalmars-d-learn
mailing list