Hello, dub makes string like the next to compile my program (WS_32.LIB at the beginning):

$ dmd -m32mscoff -lib -of.dub\\build\\library-debug-windows-x86-dmd_2072-83D2723917096513EB360761C22DDD87\\db.lib -debug -g -w -version=Have_bdb2d WS_32.LIB libdb53d.lib source/berkeleydb/* -vcolumns
Error: Error reading file 'WS_32.LIB'

So it shows error.

In other order (libraries at the end):
$ dmd -m32mscoff -lib -of.dub\\build\\library-debug-windows-x86-dmd_2072-83D2723917096513EB360761C22DDD87\\db.lib -debug -g -w -version=Have_bdb2d -Isource source/berkeleydb/* libdb53sd.lib WS2_32.LIB -vcolumns

No error.

But (again WS_32.LIB at beginning):
$ dmd -m32mscoff WS2_32.LIB libdb53sd.lib transactions_test/writer source/berkeleydb/* LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library

Again no error, only warning.

How to make with dub correct compilable compile line?

my 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"],
    "sourceFiles-windows-dmd": ["libdb53d.lib", "WS_32.LIB"],
    "dflags-windows": ["-m32mscoff"],

    "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": "*"
            }
        }
    ]
}
==========================================

Reply via email to