Installation
Installieren Sie Aspose.Email FOSS für C++
Aspose.Email FOSS für C++ hat keine externen Abhängigkeiten. Es erfordert einen C++17‑Compiler
und CMake 3.14 oder höher.
Schritt 1: Repository klonen
git clone https://github.com/aspose-email-foss/Aspose.Email-FOSS-for-Cpp.gitSchritt 2: Als CMake‑Unterverzeichnis hinzufügen
In Ihrem Projekt CMakeLists.txt:
cmake_minimum_required(VERSION 3.14)
project(my_project)
add_subdirectory(Aspose.Email-FOSS-for-Cpp)
add_executable(my_app main.cpp)
target_link_libraries(my_app PRIVATE aspose_email_foss)Schritt 3: Header einbinden
#include "aspose/email/foss/msg/mapi_message.hpp"
#include "aspose/email/foss/cfb/cfb_reader.hpp"Alle öffentlichen Header befinden sich unter include/aspose/email/foss/. Die beiden Haupt‑Subsysteme sind:
| Subsystem | Header-Verzeichnis | Schlüsselklassen |
|---|---|---|
| CFB | cfb/ | cfb_reader, cfb_writer, cfb_document, cfb_node |
| MSG | msg/ | mapi_message, msg_reader, msg_writer, msg_document |
Schritt 4: Erstellen und Überprüfen
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build buildÜberprüfen Sie mit einem Minimalprogramm:
#include <iostream>
#include "aspose/email/foss/msg/mapi_message.hpp"
int main()
{
auto message = aspose::email::foss::msg::mapi_message::create("Test", "Hello");
std::cout << message.subject() << '\n';
// Output: Test
}Unterstützte Plattformen
| Plattform | Compiler | Mindestversion |
|---|---|---|
| Linux | GCC | 9+ |
| Linux | Clang | 10+ |
| macOS | Apple Clang | 12+ |
| Windows | MSVC | 2019 (16.0+) |
Die Bibliothek wird auf allen Plattformen identisch gebaut, ohne plattformspezifischen Code oder native Abhängigkeiten.