http library for dev c++

This is a discussion on http library for dev c++ within the Networking/Device Communication forums, part of the General Programming Boards category; I am trying to write a small http client application and was wondering if there was a library for dev ...

  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    2

    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..

    Thank you,

  2. #2
    Registered User jeffcobb's Avatar
    Join Date
    Dec 2009
    Location
    Henderson, NV
    Posts
    875
    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?
    C/C++ Environment: GNU CC/Emacs
    Make system: CMake
    Debuggers: Valgrind/GDB

  3. #3
    Registered User
    Join Date
    Dec 2009
    Posts
    2
    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?

  4. #4
    Registered User
    Join Date
    Jul 2007
    Posts
    131
    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.

  5. #5
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    Quote Originally Posted by JoeBooFoo View Post
    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..

    Thank you,
    InternetOpen() for windows.

    Libwww for linux.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  6. #6
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    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
    Code:
    #include <curl/curl.h>
    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.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  7. #7
    Registered User jeffcobb's Avatar
    Join Date
    Dec 2009
    Location
    Henderson, NV
    Posts
    875
    Quote Originally Posted by JoeBooFoo View Post
    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?
    I have a pretty low opinion of aspects of wininet but I am sure others will be glad to help here..

    As for the glibc vs glib, yes my eyes were not open then... :-\
    C/C++ Environment: GNU CC/Emacs
    Make system: CMake
    Debuggers: Valgrind/GDB

  8. #8
    Registered User
    Join Date
    Apr 2007
    Posts
    137
    Never use external libs on Windows : everything is included inside win32 api
    Tons of samples in MSDN for Wininet.
    Very simple.

  9. #9
    Registered User
    Join Date
    Aug 2006
    Posts
    68
    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?

    TIA, Hawk

  10. #10
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,270
    Quote Originally Posted by Alex31 View Post
    Never use external libs on Windows : everything is included inside win32 api
    Tons of samples in MSDN for Wininet.
    Very simple.
    Translation: "Make sure your code is non-portable." Bad advice.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

  11. #11
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,257
    Quote Originally Posted by Hawkin View Post
    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?

    TIA, Hawk
    My suggestion is libcurl.
    bit∙hub [bit-huhb] n. A source and destination for information.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Property Set Library (PSL) - Announcement
    By vultur_gryphus in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 05-29-2008, 07:04 AM
  2. looking for small freeware library that support http connections
    By umen242 in forum Networking/Device Communication
    Replies: 0
    Last Post: 03-23-2008, 04:21 AM
  3. HTTP with Portable Component Library
    By karas in forum C++ Programming
    Replies: 1
    Last Post: 02-27-2006, 10:28 AM
  4. very weird .h problem
    By royuco77 in forum C++ Programming
    Replies: 1
    Last Post: 09-11-2005, 08:55 AM
  5. http application library known ?
    By chris78 in forum Linux Programming
    Replies: 3
    Last Post: 04-28-2004, 11:13 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21