Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Wed Oct 21, 2026 11:22 am

I'm updating from Spire.Doc 13.8.2 to Spire.doc 14.9.11
First there is no longer "Spire.Doc.o.h"
Some classes ware moved without any info to what is the new namespace
The library now is entirely using non wide string this is a really big change that there should be some build flag to enable.
Who decided that all of those changes are a good idea without a Document describing all of the braking changes.

lyubomir.yurukov
 
Posts: 3
Joined: Mon Dec 11, 2023 9:17 am

Thu Oct 22, 2026 9:24 am

Hello lyubomir,

Sorry for the inconvenience this upgrade has caused you. Yes, Spire.Doc 14.9.11 was a significant structural adjustment on our side. Beyond adapting to more platforms, we restructured the product to fully align with the complete .NET feature set.
"Spire.Doc.o.h" has indeed been removed, existing #include "Spire.Doc.o.h" lines need to be replaced with the specific headers shown below.
Code: Select all
#include <iostream>
#include "Spire/Doc/Document.h"
#include "Spire/Doc/Section.h"
#include "Spire/Doc/Documents/Paragraph.h"
#include "Spire/Doc/Fields/TextRange.h"

using namespace std;
using namespace Spire::Doc;
using namespace Spire::Doc::Documents;

int main()
{
    std::string outputFile = "HelloWorld.docx";
    // Create a Word document
    intrusive_ptr<Document> document = new Document();
    // Add a new section
    intrusive_ptr<Section> section = document->AddSection();
    // Add a new paragraph
    intrusive_ptr<Paragraph> paragraph = section->AddParagraph();
    // Append text
    paragraph->AppendText("Hello World!");
    // Save the document file.
    document->SaveToFile(outputFile.c_str(), FileFormat::Docx);
    // Release resources
    document->Close();
    return 0;
}


For the non-wide-string change: LPCWSTR_S changed from const wchar_t* to const char* (UTF-8), and APIs such as AppendText and LoadFromFile/SaveToFile now take const std::string&. This was part of the broader structural adjustment in 14.9.11.

We've added a detailed update log comparing against previous versions. Please refer to it here:
https://www.e-iceblue.com/news/Spire.Doc-for-CPP/spiredoc-for-cpp-14-9-11.html

If your project has any other issues, please feel free to contact us.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1538
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.Doc