설치
C++용 Aspose.Email FOSS 설치
Aspose.Email FOSS for 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+) |
이 라이브러리는 모든 플랫폼에서 동일하게 빌드되며, 플랫폼별 코드나 네이티브 종속성이 없습니다.