curlpp wrapper installieren (windows)



  • Hallo,

    Ich bin auf der Suche nach einem Tutorial, das erklärt, wie man curlpp unter Windows (Am besten in Visual Studio 2010 oder in Code::Blocks) installieren kann... habe wirklich schon lange gesucht, wäre nett wenn ihr mir das erklären könntet ...



  • Das sollte nicht all zu schwierig sein.
    Headerdateien, Bibliotheken korrekt eintragen. Und die nötigen dll's zum Projekt dazulinken. Und das sollte dann gehen. So gehts zumindest bei den meisten anderen Bibliotheken.



  • Okay, Danke Schön...

    Ich werd mal schauen...



  • Aber wo bekomme ich die Header Dateien her?





  • Hm... ich verstehs nicht... Da bekomm ich nur eine dll und eine .lib...

    Gibts dazu nicht irgendwo ein anständiges tutorial?



  • offensichtlich brauchst du die tar.gz wenn da steht, dass in den anderen Paketen nur die Binaries drin sind 🙄



  • Aber ich weiß nicht, wie man das alles Einträgt usw... könnte mir jmd. helfen?



  • Guck mal hier meine Anleitung für VS (mein erster Post):
    http://www.c-plusplus.net/forum/291170



  • Hey, Danke... habe alles gemacht, wie beschrieben

    1. Erzeuge ein Unterordner flint in deinem Projekt Ordner 
    2. Kopiere dorthin die flint.h, flint.lib, flint.dll 
    3. Füge bei den Projekt Settings unter C/C++ > General > Additional Include Directories den Pfad flint hinzu 
    4. Füge bei den Projekt Settings unter Linker > General > Additional Library Directories den Pfad flint hinzu 
    5. Füge bei den Projekt Settings unter Linker > Input > Additional Dependencies den Eintrag flint.lib hinzu 
    6. In deinem Projekt benutzt Du nun
    C/C++ Code:
    #include <flint.h>	
    C/C++ Code:
    #include <flint.h>
    

    Nur halt mit den Bibliotheken (libcurlMD.dll und libcurlMD.lib)
    Und halt den Ordner include aus der .tar.gz

    Aber jetzt, wenn ich den BeispielCode kompilieren möchte

    /**
    * \file
    * The most simple example.
    * 
    */
    
    #include <curlpp/curlpp.hpp>
    #include <curlpp/Easy.hpp>
    #include <curlpp/Options.hpp>
    
    using namespace curlpp::options;
    
    int main(int, char **)
    {
      try
      {
        // That's all that is needed to do cleanup of used resources (RAII style).
        curlpp::Cleanup myCleanup;
    
        // Our request to be sent.
        curlpp::Easy myRequest;
    
        // Set the URL.
        myRequest.setOpt<Url>("http://example.com");
    
        // Send request and get a result.
        // By default the result goes to standard output.
        myRequest.perform();
      }
    
      catch(curlpp::RuntimeError & e)
      {
        std::cout << e.what() << std::endl;
      }
    
      catch(curlpp::LogicError & e)
      {
        std::cout << e.what() << std::endl;
      }
    
      return 0;
    }
    

    Kommen flogende Errors.

    1>------ Build started: Project: curl, Configuration: Debug Win32 ------
    1>Build started 8/26/2011 6:22:10 PM.
    1>PrepareForBuild:
    1>  Creating directory "C:\Users\R3G1N4\documents\visual studio 2010\Projects\curl\Debug\".
    1>InitializeBuildStatus:
    1>  Creating "Debug\curl.unsuccessfulbuild" because "AlwaysCreate" was specified.
    1>ClCompile:
    1>  stdafx.cpp
    1>  curl.cpp
    1>c:\users\r3g1n4\documents\visual studio 2010\projects\curl\curl\curl.cpp(7): warning C4627: '#include <curlpp.hpp>': skipped when looking for precompiled header use
    1>          Add directive to 'StdAfx.h' or rebuild precompiled header
    1>c:\users\r3g1n4\documents\visual studio 2010\projects\curl\curl\curl.cpp(8): warning C4627: '#include <Easy.hpp>': skipped when looking for precompiled header use
    1>          Add directive to 'StdAfx.h' or rebuild precompiled header
    1>c:\users\r3g1n4\documents\visual studio 2010\projects\curl\curl\curl.cpp(9): warning C4627: '#include <Options.hpp>': skipped when looking for precompiled header use
    1>          Add directive to 'StdAfx.h' or rebuild precompiled header
    1>c:\users\r3g1n4\documents\visual studio 2010\projects\curl\curl\curl.cpp(44): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source?
    1>
    1>Build FAILED.
    1>
    1>Time Elapsed 00:00:01.26
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    

    Könnt ihr mir jetzt noch einmal weiterhelfen? 😞



  • 1>c:\users\r3g1n4\documents\visual studio 2010\projects\curl\curl\curl.cpp(7): warning C4627: '#include <curlpp.hpp>': skipped when looking for precompiled header use
    1> Add directive to 'StdAfx.h' or rebuild precompiled header
    1>c:\users\r3g1n4\documents\visual studio 2010\projects\curl\curl\curl.cpp(8): warning C4627: '#include <Easy.hpp>': skipped when looking for precompiled header use
    1> Add directive to 'StdAfx.h' or rebuild precompiled header
    1>c:\users\r3g1n4\documents\visual studio 2010\projects\curl\curl\curl.cpp(9): warning C4627: '#include <Options.hpp>': skipped when looking for precompiled header use
    1> Add directive to 'StdAfx.h' or rebuild precompiled header
    1>c:\users\r3g1n4\documents\visual studio 2010\projects\curl\curl\curl.cpp(44): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source?
    1>

    Mach mal prekompilierte header aus



  • Dieser Thread wurde von Moderator/in pumuckl aus dem Forum C++ (auch C++0x) in das Forum Compiler- und IDE-Forum verschoben.

    Im Zweifelsfall bitte auch folgende Hinweise beachten:
    C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?

    Dieses Posting wurde automatisch erzeugt.



  • Hab ich jetzt, bringt aber nichts. Die Errors bleiben.



  • Woran kann das denn noch liegen?


Log in to reply