GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Cannot compile python bindings · Issue #247 · xtensor-stack/xtensor-python Open DescriptionI have some issues compiling python bindings for my project involving xtensor. cmake_minimum_required(VERSION 3.13 FATAL_ERROR) project(XTensorPythonTest LANGUAGES CXX) set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) SET(CMAKE_CXX_STANDARD 17) SET(CMAKE_CXX_STANDARD_REQUIRED ON) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif() set(CMAKE_CXX_FLAGS "-Wall -Wextra -g") set(CMAKE_CXX_FLAGS_DEBUG "-g") set(CMAKE_CXX_FLAGS_RELEASE "-O3 -ffast-math -march=native -mtune=native") find_package(xtl REQUIRED) find_package(xtensor REQUIRED) find_package(xtensor-python REQUIRED) find_package(pybind11 REQUIRED) find_package(NumPy REQUIRED) message(STATUS "Found numpy: ${NUMPY_INCLUDE_DIRS}") # These are my includes include_directories("./include") # xtensor-python requires numpy includes include_directories(${NUMPY_INCLUDE_DIRS}) add_executable(run_tests ${SOURCES} run_tests.cpp) target_link_libraries(run_tests xtensor xtensor::optimize xtensor::use_xsimd xtensor-python) pybind11_add_module(XTensorPythonTest include/Python.cpp) with Python.cpp #include <pybind11/pybind11.h> #include <pybind11/stl.h> // #include <pybind11/stl_bind.h> #include <pybind11/operators.h> #include <pybind11/functional.h> #define FORCE_IMPORT_ARRAY #include "xtensor-python/pyarray.hpp" // Numpy bindings // My includes namespace py = pybind11; PYBIND11_MODULE(XTensorPythonTest, m) { /* PyBind Stuff */ } My conda environment has installed:
I use gcc 10.2 (system installation) and cmake 3.19.1 (system installation). I also have copied Now during compilation I get ActivityMetadataMetadataAssigneesLabelsNo labels TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — 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. |