GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - pypros/boost_python_bindings

BranchesTags
Open more actions menu

Latest commit

 

History

16 Commits
16 Commits

Folders and files

NameName
Last commit message
Last commit date
boost_bindings
boost_bindings
 
 
cpp_code
cpp_code
 
 
Dockerfile
Dockerfile
 
 
README.md
README.md
 
 
docker-compose.yml
docker-compose.yml
 
 

Repository files navigation

boost_python_bindings

Setup env

docker-compose up -d

Log on to container

docker-compose exec boost_python sh

Boost bindings

  1. Creat symboli link to python3. Deflaut boost python creat only -lboost_python which is library to python2.
ln -s /usr/lib/x86_64-linux-gnu/libboost_python-py36.so /usr/lib/x86_64-linux-gnu/libboost_python3.so
  1. Make folder and name it build
mkdir build
  1. Go to root folder project and do all steps:

  2. Build Rectangle.o - object file

g++ -o build/Rectangle.o -c cpp_code/library_rectangle/src/Rectangle.cpp -Wall -fPIC -I/usr/include/python3.6 -Icpp_code/library_rectangle/inc/
  1. Build Square.o - object file
g++ -o build/Square.o -c cpp_code/library_square/src/Square.cpp -Wall -fPIC -I/usr/include/python3.6 -Icpp_code/library_square/inc/
  1. Build Square.o - object file
g++ -o build/Shapes.o -c boost_bindings/Shapes.cpp -Wall -fPIC -I/usr/include/python3.6 -Icpp_code/library_rectangle/inc/ -Icpp_code/library_square/inc/
  1. Build shapes.so - shared object library - which will be import to python
g++ -shared -o shapes.so build/Rectangle.o  build/Shapes.o  build/Square.o -L/usr/local/lib -lpython3.6m -lboost_python3 -lboost_system
  1. in root folder run
python3
  1. Import shapes library
from shapes import Rectangle, Square

About

No description, website, or topics provided.

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.