Skip to content
This repository has been archived by the owner on Mar 7, 2022. It is now read-only.

How to use tolc with a simple header only library

Notifications You must be signed in to change notification settings

Tolc-Software/header-only-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Header only demo with tolc

Usage

Prerequisites

You need the following installed locally:

  • CMake - Tested with >3.15.
  • python - The language to translate to.

Building and importing

Clone this repository

Go to the root of the project and generate the build files:

$ cmake -S. -Bbuild

This will automatically download tolc, and anything needed to build the library for use in python (in this case, the pybind11 project).

Build the library:

$ cmake --build build

You should now be able to start using the C++ library Greeter from python:

$ cd python
$ python3 sayHello.py
Hello from C++!
Hello to Python!

Now whenever you change the any of the headers in the include directory and rebuild, the new functions and classes will be available from python.

About

How to use tolc with a simple header only library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published