http library for dev c++
I am trying to write a small http client application and was wondering if there was a library for dev c++ that anyone knew of?
I found libwww and libcurl, but can not find documentation on how to install them on dev c++..
I am writing in C and not C++
All suggestions would be greatly appreciated..
Just a guess b/c I do very little C anymore but glibc might be something to look into; obviously has C support, know it has support for web-oriented stuff like XML, etc and since it is free software probably works well with dev C++. That said if you are writing in C and not C++, is not an obvious question why use a C++ compiler/front-end?
dunno.... using it cause it said dev c/c++....
will checkout glibc...
i got into reading msdn tonight some and came across wininet and winhttp...
ever used either?
Are you sure you don't mean GLib or something? Glibc doesn't have any better support for HTTP than any other C standard library.
InternetOpen() for windows.
Originally Posted by JoeBooFoo
Libwww for linux.
The OP did mention that they knew about libwww and libcurl, but just couldn't get them to work.
You can usually download MSVC development libraries and get them to work with Dev-C++. For example, you could download this package: cURL: win32-devel-msvc from Mirrors
(libcurl development package for MSVC, without SSL support).
Then link a project with the .lib file in that archive, and add its include/ directory to your include path. That should be all you need to do to get it to work. I'm sure libwww is similar, if you wanted to do that.
Adding a .lib file to your project (and you need a project, a single source file won't work): it's probably easiest to copy the .lib file to C:\Dev-C++\lib, or the equivalent, depending on where you installed Dev-C++. Then go to project options and add the new .lib to the list of libraries to be linked with.
Adding the include/ directory to your inclusion path: it's probably easiest to just copy the include/curl directory from the archive to C:\Dev-C++\include, so that you have files like C:\Dev-C++\include\curl\curl.h. Then you can use
inside your code. If you prefer not to mess with the standard include directories, you can instead add the include/curl directory to your project in the project settings dialog.
I have a pretty low opinion of aspects of wininet but I am sure others will be glad to help here..
Originally Posted by JoeBooFoo
As for the glibc vs glib, yes my eyes were not open then... :-\
Never use external libs on Windows : everything is included inside win32 api
Tons of samples in MSDN for Wininet.
Sorry for intruding to your thread. I would like to know what you all suggest to use for just sending POST requests and receiving server answers. Using Windows, DevC++, C.
I want it to be a simple lib so I can learn it as fast as possible, or, for my simple needs, should I rather learn about http headers and send raw packets containing POST requests with winsock2?
Translation: "Make sure your code is non-portable." Bad advice.
Originally Posted by Alex31
My suggestion is libcurl.
Originally Posted by Hawkin