Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue May 30, 2023 1:35 pm

Dear Support,

I am currently working on a project that requires the usage of the Spire.Pdf library in a C++ environment on Ubuntu 20.04.4 LTS. I have encountered some difficulties while attempting to integrate the library and would greatly appreciate your assistance.

The specifications of my environment are as follows:
Operating System: Ubuntu 20.04.4 LTS
Compiler: g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0

Upon reviewing the available documentation, I noticed that there are only instructions provided for integrating Spire.Pdf into Windows Visual Studio, which unfortunately I cannot use on Ubuntu. Therefore, I kindly request guidance on how to integrate the Spire.Pdf library specifically for Ubuntu and the g++ compiler. Alternatively, if it is more suitable, I am open to using a different compiler.

I attempted to install the library independently, but I encountered issues and was unable to succeed. I have attached a sample project that I have been working on for reference.

When I tried to compile the project, I received the following error:

`g++ test.cpp -o test`
/usr/bin/ld: /tmp/ccDawKLo.o: in function `main':
test.cpp:(.text+0x20): undefined reference to `Spire::Pdf::PdfDocument::PdfDocument()'
/usr/bin/ld: test.cpp:(.text+0x37): undefined reference to `Spire::Pdf::PdfDocument::LoadFromFile(wchar_t const*)'
/usr/bin/ld: test.cpp:(.text+0x4f): undefined reference to `Spire::Pdf::PdfDocument::SaveToFile(wchar_t const*, Spire::Pdf::FileFormat)'
/usr/bin/ld: test.cpp:(.text+0x5b): undefined reference to `Spire::Pdf::PdfDocument::Close()'
collect2: error: ld returned 1 exit status

I attempted to address the issue by specifying the library link using the following command:

`g++ test.cpp -L./lib/x64/release -lSpire.Pdf.Cpp -o test`
/usr/bin/ld: cannot find -lSpire.Pdf.Cpp
collect2: error: ld returned 1 exit status

I apologize if I have overlooked any obvious steps or made any mistakes, as it has been some time since I last worked with C++. I would greatly appreciate any guidance or instructions you can provide to help me successfully integrate the Spire.Pdf library into my Ubuntu and g++ environment.

Thank you very much for your attention and assistance. I look forward to your prompt response.

Sincerely,
Dima

dima_test_account
 
Posts: 4
Joined: Mon May 29, 2023 12:09 pm

Wed May 31, 2023 9:53 am

Hi Dima,

Thank you for your inquiry regarding the use of our Spire.PDF for C++ on Ubuntu system. Unfortunately, currently it does not support Linux systems.

However, we are aware that many services are deployed on Linux systems, and we understand the importance of providing Linux support for our products. As such, our development team is currently working on adding Linux support to our C++ product.

We appreciate your interest in our product and apologize for any inconvenience this may have caused. If you have any further questions or concerns, please do not hesitate to reach out to us.

Best regards,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Return to Spire.PDF