Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
44 views

How to load a python module installed in the executable folder? (C++)

I have an install structure like this: install_folder\ app.exe lib.dll python\ kitsu.py And I am trying to execute some functions in my application from the file kitsu.py. My C++ code is like this: ...
hi everybody's user avatar
0 votes
0 answers
45 views

Why does process.communicate cause my program to be killed?

I'm running some code for a program in python, and when I run c++ I need to handle standard input for my it, such as scanf and cin. I am running the compiled c++ program using subprocess.Popen. I ...
user23783268's user avatar
-1 votes
0 answers
51 views

How do I install mysqlclient 1.4.6? (Python 3.6) MacOs?

I install pip install mysqlclient==1.4.6 --no-cache-dir But an error occurs: ld: library 'ssl' not found clang: error: linker command failed with exit code 1 (use -v to see invocation) ...
Ilya's user avatar
  • 1
0 votes
0 answers
17 views

OpenMC Statepoints and Tally

OpenMC is a C++ open-source software for neutron transport calculations. openmc is an homonymous Python library that binds Python to OpenMC. I have no training to OpenMC and tried to figured out from ...
PackSciences's user avatar
-4 votes
0 answers
99 views

Python set is faster than cpp set

Working with cpp std::unordered_set, I noticed running time is much longer than I expected. Comparing it to Python brings those suprising results: C++: #include <iostream> #include <chrono>...
blumen's user avatar
  • 1
-1 votes
0 answers
38 views

python not running in C++ and displaying "Could not find platform dependent libraries <exec_prefix>"

I was trying to execute a python function in C++ but when I execute the .exe file it says Could not find platform dependent libraries <exec_prefix> I use g++ RunFile.cpp -o output -L C:\Python39\...
LEBG's user avatar
  • 9
0 votes
1 answer
57 views

shiboken6: constexpr variable must be initialized by a constant expression

I am trying to build some python wrappers using shiboken6 and Pyside6. I have managed to get the code compiling on a single machine, but now that I migrated the code to a build server, I am getting a ...
meetaig's user avatar
  • 915
0 votes
1 answer
52 views

Cython - How do we implement Tuple of Object in Cython?

I want to implement tuple of object in my cython project. I couldn't find a way to implement in .pyx file so that I can use it in python. You can check my get_language method for some reference. And ...
Punreach Rany's user avatar
0 votes
0 answers
14 views

An error occurs when compiling a third-party library using swig

I have a C++ portable bag third-party library whose function is camera acquisition. I hope to call it in python. First, I wrote the swigtest.h file and swigtest.cpp file: #pragma once #include <...
jiabin liu's user avatar
0 votes
0 answers
27 views

(Under Windows 10 system) How to find the base address of the .so file in the Android emulator?

(Under Windows 10 system) How to find the base address of the .so file in the Android emulator? Or how to scan data in Android emulator to get the base address or static pointer of that data? Use ...
jiehao hong's user avatar
0 votes
0 answers
50 views

Communicate between a Python Server and C++ Client

The C++ client connects to the Python server without any issues, but when I send a message it's never received by the server. I don't get any errors or unexpected results on the client either, it ...
massacring's user avatar
-1 votes
0 answers
18 views

how to redirect absl logs in a pybinded C++ from the calling Python module [closed]

I have a Python binary that leverages numerous C++ functions through pybind11. Both in Python and C++ I'm using absl logging. I am trying to setup absl in Python to wrote logs to file instead of ...
Amir's user avatar
  • 509
0 votes
0 answers
32 views

Which api in `libtorch` corresponding the `ctx.needs_input_grad` in pytorch when to define custom `torch.autograd.Function`?

When I tanslate the following python code to cpp code with libtorch api class _SphericalHarmonics(torch.autograd.Function): """Spherical Harmonics""" @...
Zhiguo Tang's user avatar
0 votes
0 answers
38 views

A property of Python class returns an empty numpy array with pybind11

I adopted a project that was abandoned by it's original creator on GH: pybind11 bindings for whispercpp. I had to update Python version from 3.8 to 3.11.8 in CI and discovered that some of the test ...
WintermuteAI's user avatar
-5 votes
0 answers
101 views

pow function in C++ is slow [closed]

py lang: a = 3 pow(3, a) C++ lang: #include <iostream> #include <math.h> int main() { int a = 3; std::cout << pow(3, a); } After I ran it on OUTPUT windows of VS Code, the ...
Unknown1712's user avatar

15 30 50 per page
1
2 3 4 5
720