adamdruppe / arsd

This is a collection of modules that I've released over the years. Most of them stand alone, or have just one or two dependencies in here, so you don't have to download this whole repo.
http://arsd-official.dpldocs.info/arsd.html
530 stars 127 forks source link

LINK : fatal error LNK1104: cannot open file 'crypto.lib'? #255

Closed mw66 closed 4 years ago

mw66 commented 4 years ago
$ grep arsd dub.json
                "arsd-official": "~>7.2.0",

$ dub.exe --version
DUB version 1.21.0, built on May 11 2020

$ dmd.exe --version
DMD64 D Compiler v2.092.0-dirty
Copyright (C) 1999-2020 by The D Language Foundation, All Rights Reserved written by Walter Bright

So where I can get the 'crypto.lib'? on Windows 10?

Thanks.

mw66 commented 4 years ago

found this one:

AppData/Local/dub/packages/vibe-d-0.8.6/vibe-d/lib/win-amd64/libcrypto.lib

but not under: AppData/Local/dub/packages/arsd-official-7.2.0/

mw66 commented 4 years ago

and this error:

LINK : fatal error LNK1104: cannot open file 'ssl.lib'

mw66 commented 4 years ago

LINK : fatal error LNK1104: cannot open file 'libmysql.lib'

mw66 commented 4 years ago

only found:

AppData/Local/dub/packages/arsd-official-7.2.0/arsd-official/arsd-official_mysql.lib

but the name doesn't match.

mw66 commented 4 years ago

LINK : fatal error LNK1104: cannot open file 'pq.lib'

mw66 commented 4 years ago
/AppData/Local/dub$ find .  -name '*pq*lib'
# nothing showed up
adamdruppe commented 4 years ago

On Tue, May 19, 2020 at 11:54:16PM -0700, mingwugmail wrote:

            "arsd-official": "~>7.2.0",

Never use the top-level package. Only use the individual subpackage you actually need. Dub doesn't treat it well as a whole block...

adamdruppe commented 4 years ago

so for these:

crypto.lib and ssl.lib (not necessary in my newest version but not yet pushed so that doesn't help you) are part of OpenSSL. openssl is used by the http libs.

mysql.lib is the MySQL C library.

pq.lib is the PostgreSQL C library.

Each of those are downloaded from their own websites as part of installing those platforms. But if you aren't using them, don't do that! Just use the other subpackage for your specific goal instead.

mw66 commented 4 years ago

Thanks. Yes, that solve my current problem.

But, I think those libraries should come together with the package, so the library user will have a more smooth build process (suppose in a auto-build system).

Those libraries are quite mature & stable, nobody cares if it's old; and even old is better than missing. If for any other reason (e.g. external licensing or permission issue) that the library cannot be distributed with the package, then can we update the readme remind the user to download them manually (better provide external url, or automate by dub).

For the library provided, e.g. AppData/Local/dub/packages/arsd-official-7.2.0/arsd-official/arsd-official_mysql.lib

we should make the filename and the entry in the dub.json matches.

Thanks again for maintaining this package, I just want to make its user experience even better.

adamdruppe commented 4 years ago

On Wed, May 20, 2020 at 10:26:25AM -0700, mingwugmail wrote:

But, I think those libraries should come together with the package, so the library user will have a more smooth build process (suppose in a auto-build system).

The .libs aren't what matter though, they are just a minimal interface to the dll, which is an interface to the database server. (OpenSSL could prolly be included though, at least I can put up a direct download link).

So either way, they have to install something. I can add a more explicit note to the readme though. I'll include that in the next release.

For the library provided, e.g. AppData/Local/dub/packages/arsd-official-7.2.0/arsd-official/arsd-official_mysql.lib

I think that's generated by dub just to cache that module's build since I don't provide such a thing myself.

adamdruppe commented 4 years ago

The crypto.lib is now dynamically loaded and doesn't need the packaged thing so gonna close htis.