Library Frage



  • Hallo,

    ich habe bei Codeguru ein Projekt gefunden, mit dem ich ZIP-Funktionalität in mein Projekt einschließen kann.

    Nur habe ich ein par Fragen, wie ich mein Projekt nun wirklich damit bereichern kann. In Codeguru steht:

    How to integrate with the project
    Zip is a static library and statically links to compiled zlib.lib (version 1.13 nowadays). The zlib library can be replaced with a newer version providing you also replace the files: "zlib.h" and "zconf.h" in the Zip project. The Zip library uses MFC in a shared library as a Release and Debug Configuration. Your project must use MFC in the same way in the appropriate project configuration. You may need to adapt this to your needs. To add Zip library functionality to your project you need to link the library to the project.
    Method 1
    Add "..\Zip\debug(release)\Zip.lib" to Project Settings->Link->Input->Object/library modules and add Zip directory to the preprocessor searches (Project Settings -> C++ -> Preprocessor -> Additional include directories).

    Also so wie das anhand des Pfades aussieht, liegt das ganze Zip-Projekt im Ordner über meinem Projekt im Verzeichnis "Zip". Ich möchte aber nicht das ganze Zip Projekt da herumliegen haben. Kann ich auch einfach die Zip.lib in mein Projektverzeichnis kopieren und entsprechend linken und das Zip-Projekt löschen? Oder braucht der Compiler noch andere Dateien von dem Projekt? (Die Header Datei müßte ich sicherlich auch kopieren).



  • Das Kommt darauf an ob du dazu die passende DLL brauchst oder ob bereits alles in der lib ist. Die "zlib.h" und "zconf.h" Brauchst du auf jeden fall noch. Die Neuse Version bekommt du auf www.zlib.org Da gibt es auch ein Binary mit nur den Nötigsten Daten (Must das ander Project also nicht auseinandernehmen) und auch den Gesamten Source Code zum Selber Linken



  • Ja, schon klar.
    Nur diese zlib.lib ist nochmal mit einem Projekt "A" umpackt. Also Projekt A benutzt die zlib.lib. Ich möchte in meinem Projekt (Projekt "B") das Projekt A verwenden. Also geht mich diese zlib.lib, welche Projekt A verwendet, im Grunde genommen gar nichts an. Ich möchte jetzt nur:

    Eine neue eigene vollständige XXX.lib vom Projekt A haben, welche ich dann in Projekt B benutzen kann. Aber wie bekomme ich diese neue lib? Kann ich sie beim Kompilieren irgentwie erzeugen? Wenn ja, wie ?


Anmelden zum Antworten