التثبيت
تثبيت Aspose.Email FOSS لـ C++
Aspose.Email FOSS for C++ has no external dependencies. It requires a C++17 compiler and CMake 3.26 or later.
الخطوة 1: استنساخ المكتب
git clone https://github.com/aspose-email-foss/Aspose.Email-FOSS-for-Cpp.gitالخطوة 2: إضافة كمديرية CMake
في مشروعك الخاص CMakeLists.txt:
cmake_minimum_required(VERSION 3.26)
project(my_project)
add_subdirectory(Aspose.Email-FOSS-for-Cpp)
add_executable(my_app main.cpp)
target_link_libraries(my_app PRIVATE AsposeEmailFoss::AsposeEmailFoss)الخطوة الثالثة: إدراج الرؤوس
#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 | كلاينغ | 10+ |
| macOS | Apple كلاينغ | 12+ |
| Windows | MSVC | 2019 (16.0+) |
يبدو أن المكتبة هي نفسها على جميع المنصات مع لا رمز خاص بالمنصة أو الاعتماد الأصلي.