curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: getting libcurl to run with C in codeblocks (mingw-32)

From: Greg Saunders <gmsaunders_at_gmail.com>
Date: Thu, 1 Dec 2016 07:35:29 -0600

Thanks, Thomas - but I think it is different on Windows vs Linux. I don't
have the UNIX commands (make etc), I have only buildconf.bat.

I tried running that with "buildconf CC=i686-w64-mingw32-gcc ./configure
--prefix=`pwd`/../local/win33"

but that gives me an error: "Unknown argument CC"

I think my biggest problem at this point is that I don't have the "curl"
library to link to under Linker settings, but there was no curl.a or curl.o
or curl.lib file in the distribution, and I can't figure out how to make
any of those files.

Still stuck :-(

thx
greg

On Thu, Dec 1, 2016 at 3:37 AM, Thomas Glanzmann <thomas_at_glanzmann.de>
wrote:

> Hello Greg,
>
> > I've spent a few hours trying to run libcurl in codeblocks (GNU GCC
> > mingw-32 Compiler),
>
> I'm building on Debian Linux for Windows. However maybe my instructions
> help you:
>
> apt-get install git make gcc libx11-dev mingw-w64 libtool
> git clone https://github.com/curl/curl
> cd curl
> ./buildconf CC=i686-w64-mingw32-gcc ./configure
> --prefix=`pwd`/../local/win32
> make -j
> make install
>
> Afterwards I'm building using:
>
> `local/win32/bin/curl-config --cc --cflags --libs` -g -s -static -o my.exe
> my.c -Wall -fno-strict-aliasing -lcurl -lwinmm -lcrypt32 -lwldap32 -lws2_32
> -lwinhttp -lole32 -lcredui
>
> Cheers,
> Thomas
> -------------------------------------------------------------------
> List admin: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette: https://curl.haxx.se/mail/etiquette.html

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-12-01