curl-library
Re: Installing libcurl on Windows 7
Date: Mon, 15 Mar 2010 11:25:43 -0400
On Mon, Mar 15, 2010 at 2:41 AM, Vincent Torri <vincent.torri_at_gmail.com> wrote:
>
>
> On Mon, Mar 15, 2010 at 1:31 AM, Andy Horsman <minirobotics_at_gmail.com>
> wrote:
>>
>> On Sun, Mar 14, 2010 at 8:23 PM, Guenter <lists_at_gknw.net> wrote:
>> > Andy,
>> > Andy Horsman schrieb:
>> >> So I've attempted to move the curl files over to the MinGW includes
>> >> directory where C++ could access it via, #include <curl/curl.h>. I'm
>> >> no longer getting the file or directory not found error when
>> >> compiling, but I'm still not sure which options I should be using.
>> >> I've tried both -DCURL_STATICLIB and -lcurl
>> > depends if you want to link statically, or use the DLL - what used
>> > should link statically against libcurl.a
>> > but if you want to be as close as possible to a Linux devel environment
>> > then Vincent's suggestion for MSYS is probably better for you; using the
>> > static makefiles without configure / bash & co is more meant for only
>> > creating curl and the DLL; if you want to develop with this you will
>> > need to also craft makefiles which mention full path to includes and
>> > libs with -I, -L, -l - unless you copy manually things over like you did
>> > already partly above.
>> >
>> > Gün.
>>
>> g++ -L C:\MinGW\include\libs\.libs\libcurl.a curltest.cpp is still
>> presenting the same errors.
>
> -L my_path : add the path "my_path" where gcc/g++ searches the libraries
> -lxxx : gcc/g++ searches the library named :
>
>
> libxxx.dll.a
>
> xxx.dll.a
> libxxx.a
> xxx.lib
> libxxx.dll
> xxx.dll
>
> in each directory of its search path.
>
> Also, the order of the dependency libraries is important. always put on the
> right the less dependent. So I would try this:
>
>
> g++ -o curltest.exe curltest.cpp C:\MinGW\include\libs\.libs\libcurl.a
>
> Vincent Torri
>
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>
Thanks for your help, I got it to work by linking libcurl.dll.a not
libcurl.a, I also had to place libcurl-4.dll in the directory where
I'm building my project. Works like a charm now. You guys are great
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-03-15