Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script 'get_dlibcurl32', to auto-create Win32 libcurl import lib. #79

Merged
4 commits merged into from
Aug 28, 2013

Conversation

Abscissa
Copy link
Contributor

Unlike Posix and Win64, the standard libcurl binaries aren't compatible with DMD on Win32. Instead, the Win32 user has to go through various steps to get a libcurl import lib. Since libcurl is required by std.net.curl and certain DMD tools, I made this script to automate the process.

This has zero prerequisites other than an active internet connection (and a working D compiler to compile this tool).

@ghost
Copy link

ghost commented Aug 17, 2013

To avoid having to download the basic utilities package if the user already has implib installed, you could try using this:

import std.process;
bool hasImplib = executeShell("implib /h").output.startsWith("Digital Mars Import Library Manager");

@ghost
Copy link

ghost commented Aug 27, 2013

Could you add an output printout saying Use the libcurl.lib import library in the dlibcurl32-7.32.0 folder, since it might not be obvious to people what file they need to use.

The implib output is a little verbose, perhaps route it to > nul? Or maybe that would silence errors, I'm not sure.

But otherwise, I've tested it and it seems to work.

@Abscissa
Copy link
Contributor Author

The implib output is a little verbose, perhaps route it to > nul? Or maybe that would silence errors, I'm not sure.

Unfortunately, implib appears to send its error messages to stdout instead of stderr, so yea, that would silence errors.

I have added an output printout as you suggested.

@ghost
Copy link

ghost commented Aug 28, 2013

Excellent. Thanks for the hard work!

ghost pushed a commit that referenced this pull request Aug 28, 2013
Add script 'get_dlibcurl32', to auto-create Win32 libcurl import lib.
@ghost ghost merged commit e184f13 into dlang:master Aug 28, 2013
@MartinNowak
Copy link
Member

This doesn't work correctly. The curl.dll has dependencies on other dlls, among them zlib1.dll which is not included in the downloaded binary release.

I think it's a better approach to build statically linked libcurl.dll and the OMF import library according to Curl on Windows. AFAIK this is already done for the windows installer and the release, what else do we need this tool for?

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants