mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
Updating the documentation using xlnt 1.x.x
This work is to test the new version of xlnt - released today. The installation is much simpler now due to the fact that xlnt no longer relies on third party libraries. This was a great move! I have confirmed that the minimum gcc version required is 6.2.0. work will still continue into exploring how the newest gcc 7.1 will impact xlnt. However, this will be covered under another heading and documentation issue/ticket and will involve installing gcc 7.1 from source and so forth. the documentation in this commit is purely intended to get a new users off and running with xlnt in the shortest possible time and with the least amount of effort.
This commit is contained in:
parent
94c5ba2e15
commit
24ce486ebc
|
@ -8,42 +8,22 @@
|
|||
|
||||
## vcpkg
|
||||
|
||||
## Compiling from Source - Ubuntu 16.04 LTS (Xenial Xerus)
|
||||
Please run the following commands and read the comments as you go.
|
||||
You will notice that we update and upgrade quite frequently, this is to ensure that all dependancies are met at all times. You will also notice that we are installing some libraries from source, there are two reasons for this; firstly in the event that the library is not available through apt-get or secondly, because we want the very latest version (not the version available in apt-get).
|
||||
## Compiling xlnt 1.x.x from Source on Ubuntu 16.04 LTS (Xenial Xerus)
|
||||
```
|
||||
sudo apt-get update
|
||||
sudo apt-get upgrade
|
||||
sudo apt-get install cmake
|
||||
sudo apt-get install zlibc
|
||||
```
|
||||
The following steps update the compiler and set the appropriate environment variables - see note [1] below for the reason why we need to update the standard available compiler
|
||||
```
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
sudo apt update
|
||||
sudo apt-get upgrade
|
||||
sudo apt-get install gcc-6 g++-6
|
||||
sudo apt update
|
||||
sudo apt-get upgrade
|
||||
```
|
||||
The following steps will set up some environment variables for this session
|
||||
```
|
||||
export CC=/usr/bin/gcc-6
|
||||
export CXX=/usr/bin/g++-6
|
||||
```
|
||||
The following steps will install the latest GCC compiler from source (you will notice that we installed GCC 6 using apt-get, this was a building block to the next step of getting GCC 6.3.0 - the latest compiler available at present).
|
||||
Download gcc 6.3.0 from https://gcc.gnu.org/mirrors.html I used the Japanese mirror as this is the closest location to me http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-6.3.0/gcc-6.3.0.tar.gz
|
||||
|
||||
```
|
||||
cd ~
|
||||
tar -zxvf Downloads/gcc-6.3.0.tar.gz
|
||||
cd gcc-6.3.0
|
||||
./contrib/download_prerequisites
|
||||
mkdir build
|
||||
cd build
|
||||
../configure --disable-multilib --enable-languages=c,c++
|
||||
make -j 2
|
||||
sudo make install
|
||||
```
|
||||
If the above make command fails please use "make clean pristine" and then remove and remake the build directory. This will clean up and prepare the environment for another attempt. A common reason for failure on virtual machines is lack of RAM (if you don't have enough RAM you may get an error like this "recipe for target 's-attrtab' failed"). Otherwise, if all goes well in about 30 to 60 minutes the compiler will be ready and we will move on to the next steps.
|
||||
|
||||
The following steps will intall xlnt
|
||||
Download the zip file from the xlnt repository
|
||||
https://github.com/tfussell/xlnt/archive/master.zip
|
||||
|
@ -61,6 +41,10 @@ sudo ldconfig
|
|||
```
|
||||
xlnt will now be ready to use on your Ubuntu instance.
|
||||
|
||||
[1]
|
||||
Xlnt requires a minimum of gcc 6.2.0
|
||||
The most recent gcc version available using the standard APT repositories is gcc 5.4.0 (obtained through build-essential 12.1ubuntu2). If these older versions of gcc are used an error "workbook.cpp error 1502:31 'extended_property' is not a class, namespace or enumeration" will occur during the xlnt make command.
|
||||
|
||||
## Compiling from Source
|
||||
|
||||
Build configurations for Visual Studio, GNU Make, Ninja, and Xcode can be created using [cmake](https://cmake.org/) v3.2+. A full list of cmake generators can be found [here](https://cmake.org/cmake/help/v3.0/manual/cmake-generators.7.html). A basic build would look like (starting in the root xlnt directory):
|
||||
|
|
Loading…
Reference in New Issue
Block a user