Skip to content
Snippets Groups Projects
Commit 4c553600 authored by David Bergström's avatar David Bergström
Browse files

Add pybind11 library

parents
No related branches found
No related tags found
No related merge requests found
build/
[submodule "lib/pybind11"]
path = lib/pybind11
url = https://github.com/pybind/pybind11
cmake_minimum_required (VERSION 2.8.12)
project (starcraft-python-api)
add_subdirectory(lib/pybind11)
pybind11_add_module(library library.cxx)
Subproject commit 58e551cc737d77575b05de198da49479b81222a1
#include <pybind11/pybind11.h>
int add(int i, int j)
{
return i + j + 1;
}
PYBIND11_MODULE(library, m)
{
m.doc() = "pybind11 example plugin";
m.def("add", &add, "A function which adds two numbers");
}
#include <iostream>
#include <pybind11/pybind11.h>
int add(int i, int j)
{
return i + j;
}
int main (int argc, char *argv[])
{
while (true)
{
std::cout << "Hello World!" << std::endl;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment