[PYTHON] Build static library (.a) together with waf

Summary

It's OK if you specify stlib and stlibpath for bld.program (It is written in the official document, but I think that it will contribute a little to googleability, so I will write it down. )

Example

If you want to build the local libstlib1.a and libstlib2.a together,

wscript (partial excerpt)


def build(bld):
     bld.program(
        source = 'foo.cpp',
        target = 'foo',
        stlib = [
            'stlib1',
            'stlib2',
            ],
        stlibpath = ['Library path'],
        includes = ['.']
    )

For example, you can write it like this. Note that if you start with lib like stlib = ['libstlib1','libstlib2'], it will compile.

reference

--Official document The Waf Book

Recommended Posts

Build static library (.a) together with waf
Build a deb file with Docker
Build a web application with Django
Easily build a development environment with Laragon
Build a blockchain with Python ① Create a class
Build a Tensorflow environment with Raspberry Pi [2020]
Build a Fast API environment with docker-compose
Try HTML scraping with a Python library
[Linux] Build a jenkins environment with Docker
Build a python virtual environment with pyenv
Build a capture acquisition machine with Selenium
Build a modern Python environment with Neovim
[Linux] Build a Docker environment with Amazon Linux 2
Build a local server with a single command [Mac]
Build a C language development environment with a container
Build a WardPress environment on AWS with pulumi
Build a python environment with ansible on centos6
[Python] Build a Django development environment with Docker
Create a python3 build environment with Sublime Text3
Build a cheap summarization system with AWS components
Build a Django environment with Vagrant in 5 minutes
[Memo] Build a virtual environment with Pyenv + anaconda
Build a virtual environment with pyenv and venv
Build a Django development environment with Doker Toolbox
Build a Python environment with OSX El capitan
Quickly build a Python Django environment with IntelliJ
Build a Python machine learning environment with a container
Build a python execution environment with VS Code
Build a basic Data Science environment (Jupyter, Python, R, Julia, standard library) with Docker.
Build a python virtual environment with virtualenv and virtualenvwrapper
Build a python environment for each directory with pyenv-virtualenv
Precautions when installing a hierarchical include directory with waf
Build a machine learning application development environment with Python
Build a python virtual environment with virtualenv and virtualenvwrapper
Build a development environment with Poetry Django Docker Pycharm
Build a Django environment for Win10 (with virtual space)
Build a numerical calculation environment with pyenv and miniconda3
A4 size with python-pptx
Build python3.x with pyenv
Decorate with a decorator
Build a data analysis environment with Kedro + MLflow + Github Actions
Try to build a deep learning / neural network with scratch
Build a Django development environment with Docker! (Docker-compose / Django / postgreSQL / nginx)
Build Azure Pipelies with Azure DevOps in a Linux self-hosted environment
Build a machine learning scikit-learn environment with VirtualBox and Ubuntu
[Memo] Build a development environment for Django + Nuxt.js with Docker
(Now) Build a GPU Deep Learning environment with GeForce GTX 960
[Django] Build a Django container (Docker) development environment quickly with PyCharm
A sample for drawing points with PIL (Python Imaging Library).
Build a bulletin board app from scratch with Django. (Part 2)
Build a comfortable development environment with VSCode x Remote Development x Pipenv
Build a speed of light web API server with Falcon
Build a bulletin board app from scratch with Django. (Part 3)
How to build a python2.7 series development environment with Vagrant
Build a python environment with pyenv (OS X El Capitan 10.11.3)
Create a Todo app with Django ① Build an environment with Docker
Build a Python environment with WSL + Pyenv + Jupyter + VS Code