التثبيت
تثبيت Aspose.Email FOSS لـ C++
Aspose.Email FOSS لـ C++ لا يحتوي على أي تبعيات خارجية. يتطلب مترّب C++17 و CMake 3.14 أو أحدث.
الخطوة 1: استنساخ المستودع
git clone https://github.com/aspose-email-foss/Aspose.Email-FOSS-for-Cpp.gitالخطوة 2: إضافة كدليل فرعي لـ CMake
في مشروعك 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)الخطوة 3: تضمين الرؤوس
#include "aspose/email/foss/msg/mapi_message.hpp"
#include "aspose/email/foss/cfb/cfb_reader.hpp"جميع رؤوس الملفات العامة موجودة تحت include/aspose/email/foss/. النظامان الفرعيان الرئيسيان هما:
| النظام الفرعي | دليل الرأس | الفئات الرئيسية |
|---|---|---|
| CFB | cfb/ | cfb_reader, cfb_writer, cfb_document, cfb_node |
| MSG | msg/ | mapi_message, msg_reader, msg_writer, msg_document |
الخطوة 4: البناء والتحقق
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build buildتحقق باستخدام برنامج بسيط:
#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
}المنصات المدعومة
| المنصة | المترجم | الإصدار الأدنى |
|---|---|---|
| Linux | GCC | 9+ |
| Linux | Clang | 10+ |
| macOS | Apple Clang | 12+ |
| Windows | MSVC | 2019 (16.0+) |
المكتبة تُبنى بشكل متماثل على جميع المنصات دون أي شفرة خاصة بالمنصة أو تبعيات أصلية.