Giter VIP home page Giter VIP logo

build-libcurl-windows's Introduction

Auto download & compile libcurl

This batch script will automatically download the latest libcurl source code and build it using Visual Studio compiler.

Supported Visual Studio are:

  • Visual C++ 6 (require Windows Server 2003 Platform SDK released in February 2003)
  • Visual Studio 2005
  • Visual Studio 2008
  • Visual Studio 2010
  • Visual Studio 2012
  • Visual Studio 2013 Build status
  • Visual Studio 2015 Build status

Note-1: All versions of Visual Studio Express are unsupported.

Note-2: This script is using third-party open source software

Usage :

$ build.bat

To build using /MT rather than /MD:

$ build.bat -static 

Output :

third-party
└───libcurl
    ├───include
    │   └───curl
    │           curl.h
    │           curlbuild.h
    │           curlrules.h
    │           curlver.h
    │           easy.h
    │           mprintf.h
    │           multi.h
    │           stdcheaders.h
    │           typecheck-gcc.h
    │
    └───lib
        ├───dll-debug-x64
        │       libcurl_debug.dll
        │       libcurl_debug.lib
        │       libcurl_debug.pdb
        │
        ├───dll-debug-x86
        │       libcurl_debug.dll
        │       libcurl_debug.lib
        │       libcurl_debug.pdb
        │
        ├───dll-release-x64
        │       libcurl.dll
        │       libcurl.lib
        │       libcurl.pdb
        │
        ├───dll-release-x86
        │       libcurl.dll
        │       libcurl.lib
        │       libcurl.pdb
        │
        ├───static-debug-x64
        │       libcurl_a_debug.lib
        │
        ├───static-debug-x86
        │       libcurl_a_debug.lib
        │
        ├───static-release-x64
        │       libcurl_a.lib
        │
        └───static-release-x86
                libcurl_a.lib

FAQ

If you get message something like below, please re-run build.bat again.

**** Retrieving:http://curl.haxx.se/download.html ****
Downloading latest curl...
http://curl.haxx.seAn unhandled exception occurred at $004C7D39 :: Bad port number.

License (build.bat)

The MIT License (MIT)

Copyright (c) 2014 Mohd Rozi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

build-libcurl-windows's People

Contributors

blackrosezy avatar deadpikle avatar justanotheranonymoususer avatar pronin-divogames avatar yeonsh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

build-libcurl-windows's Issues

running build.bat fails on curl download

Just git cloned, on a Win10 system with Visual Studio Community 2015, executing from a VS2015 native tools command prompt, as administrator. After downloading curl.zip build.bat fails to open the file as an archive. The curl.zip file size is zero bytes, btw.

Here's the output:

build.bat
Using Visual Studio 2015
Setting up environment
Get download url...
**** Retrieving:http://curl.haxx.se/download.html ****
**** Processing: http://curl.haxx.se/download.html ****
Downloading latest curl...
--15:11:49--  http://curl.haxx.se/download/curl-7.54.0.zip
           => `curl.zip'
Resolving curl.haxx.se... done.
Connecting to curl.haxx.se[151.101.26.49]:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://curl.haxx.se/download/curl-7.54.0.zip [following]
--15:11:49--  https://curl.haxx.se/download/curl-7.54.0.zip
           => `curl.zip'
Connecting to curl.haxx.se[151.101.26.49]:443... connected.

Unable to establish SSL connection.

Unable to establish SSL connection.


Processing archive: curl.zip

Error: Can not open file as archive

There is more output after this, but it relates to files not being found that should have been in the zip.

Unable to use the static library

I'm trying to compile a simple console application with the static version of libcurl, using Visual Studio 2015.

Steps:

  1. Compile libcurl with build.bat
  2. Create a simple console project.
  3. Add CURL_STATICLIB to preprocessor definitions
  4. Add the include directory
  5. Add the corresponding lib directory (static-debug-x86)
  6. Add libcurl_a_debug.lib to the linker additional dependencies.
  7. Build
  8. Tons of warnings (120) and errors (80) like these:

Severity Code Description Project File Line
Warning LNK4217 locally defined symbol __errno imported in function _init_resolve_thread ConsoleApplication1 libcurl_a_debug.lib(asyn-thread.obj) 1
Error LNK2001 unresolved external symbol __imp__strncmp ConsoleApplication1 libcurl_a_debug.lib(connect.obj) 1

Building agains the dll works fine.

Any clue on what am I doing wrong?

This is the sample code:

#include <iostream>
#include <stdio.h> 
#include <curl/curl.h> 


int main(void)
{
    CURL *curl;
    CURLcode res;

    curl = curl_easy_init();
    if (curl) {
        curl_easy_setopt(curl, CURLOPT_URL, "http://google.com");
        res = curl_easy_perform(curl);

        /* always cleanup */
        curl_easy_cleanup(curl);
    }
    return 0;
}

NMAKE : fatal error U1052: file 'Makefile.vc' not found

Cannot compile im getting the error below

Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation.  All rights reserved.

NMAKE : fatal error U1052: file 'Makefile.vc' not found

Winbuild does not exist

Hi, does anyone know whether the latest curl contains winbuild?

cd tmp_libcurl\curl-*\winbuild

Thanks.

doesn't work out of the box

a little investigation reveals a load of undocumented dependencies (or i missed this in the documentation)

set ROOT_DIR="%CD%"
set RM="%CD%\bin\unxutils\rm.exe"
set CP="%CD%\bin\unxutils\cp.exe"
set MKDIR="%CD%\bin\unxutils\mkdir.exe"
set SEVEN_ZIP="%CD%\bin\7-zip\7za.exe"
set WGET="%CD%\bin\unxutils\wget.exe"
set XIDEL="%CD%\bin\xidel\xidel.exe"

it should be documented that there are a bunch of dependencies.

Openssl

Can there be an option to build library with openssl?

The system cannot find the path specified.

Hello,
I have a problem that keeps me stuck while building libcurl on my windows 10. I'm using visual studio 2015 and I've tried many times but the result is just the same as not working.
I am here to ask for help, thank you

link.exe /incremental:no /libpath:"..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel\lib" /out:..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel\bin\curl.exe /subsystem:console /nologo /machine:x64 libcurl_a.lib ws2_32.lib wldap32.lib advapi32.lib crypt32.lib Normaliz.lib Crypt32.lib ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl\tool_hugehelp.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl\nonblock.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl\strtoofft.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl\warnless.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl\curl_ctype.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl\curl_multibyte.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl\version_win32.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl\dynbuf.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/slist_wc.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_binmode.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_bname.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_cb_dbg.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_cb_hdr.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_cb_prg.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_cb_rea.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_cb_see.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_cb_wrt.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_cfgable.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_convert.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_dirhie.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_doswin.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_easysrc.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_filetime.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_formparse.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_getparam.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_getpass.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_help.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_helpers.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_homedir.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_libinfo.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_main.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_metalink.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_msgs.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_operate.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_operhlp.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_panykey.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_paramhlp.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_parsecfg.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_progress.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_strdup.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_setopt.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_sleep.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_urlglob.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_util.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_vms.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_writeout.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_writeout_json.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl/tool_xattr.obj ..\builds\libcurl-vc-x64-release-static-ipv6-sspi-schannel-obj-curl\curl.res
The system cannot find the path specified.
C:\build-libcurl-windows-master\bin\unxutils\cp.exe: lib*.pdb: No such file or directory
C:\build-libcurl-windows-master\bin\unxutils\cp.exe: lib*.lib: No such file or directory
C:\build-libcurl-windows-master\bin\unxutils\cp.exe: bin*.dll: No such file or directory
The system cannot find the path specified.
C:\build-libcurl-windows-master\bin\unxutils\cp.exe: lib*.pdb: No such file or directory
C:\build-libcurl-windows-master\bin\unxutils\cp.exe: lib*.lib: No such file or directory
C:\build-libcurl-windows-master\bin\unxutils\cp.exe: bin*.dll: No such file or directory
The system cannot find the path specified.
C:\build-libcurl-windows-master\bin\unxutils\cp.exe: lib*.lib: No such file or directory
The system cannot find the path specified.
C:\build-libcurl-windows-master\bin\unxutils\cp.exe: lib*.lib: No such file or directory
The system cannot find the path specified.
C:\build-libcurl-windows-master\bin\unxutils\cp.exe: lib*.pdb: No such file or directory
C:\build-libcurl-windows-master\bin\unxutils\cp.exe: lib*.lib: No such file or directory
C:\build-libcurl-windows-master\bin\unxutils\cp.exe: bin*.dll: No such file or directory
The system cannot find the path specified.
C:\build-libcurl-windows-master\bin\unxutils\cp.exe: lib*.pdb: No such file or directory
C:\build-libcurl-windows-master\bin\unxutils\cp.exe: lib*.lib: No such file or directory
C:\build-libcurl-windows-master\bin\unxutils\cp.exe: bin*.dll: No such file or directory
The system cannot find the path specified.
C:\build-libcurl-windows-master\bin\unxutils\cp.exe: lib*.lib: No such file or directory
The system cannot find the path specified.
C:\build-libcurl-windows-master\bin\unxutils\cp.exe: lib*.lib: No such file or directory
C:\build-libcurl-windows-master\bin\unxutils\cp.exe: include: No such file or directory
Done.

Windows XP compatibility

EntryPoint GetTickCount64 not found in kernel32.dll on when compiling my programs with curl and start them in windows xp.

fatal error LNK1181: cannot open input file

I'm getting the error with libssh2.obj:

LINK : fatal error LNK1181: cannot open input file '..\builds\libcurl-vc-x64-release-static-ipv6-sspi-winssl-obj-lib/vssh/libssh2.obj'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\lib.exe"' : return code '0x49d'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.