Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 1 year ago. Improve this question I have a function in C++ code which I want to call from
Tag: c++
Run python script from C# via command prompt
I’m developing a Winform application. I want to run python script from c# via command prompt (i’m using System.Diagnostics.Process class) I have a function to run python script that need to pass a python script file name. It works correctly until I print a string that contain unicode character. My test.py code contains just a single line. When I compiled
ESP32 – combining two or more SDK example projects into one
tl;dr — how do I combine a pair of SDK projects together and have the “menuconfig” system work properly? I have a simple project in mind for an ESP32 module: Have the ESP32 provide a new dedicated WiFi network that allows a smart phone to connect directly to the ESP32. Once connected, the phone can point its web browser to
How to set arbitrary size array in ctypes?
So I have a function imported from a .dll library that takes in a pointer to a struct of the form: The idea of function is that if A is NULL, then function(D*) will update A with the size of the required buffer. Hence, if on the other hand B is an array of size A, then function(D*) will return
Forks and Pipes in c++
I am using 4 processes in which A’s output will goto A1 and A1’s output will go to A2 and A2 output will come out in the console. Even A1 output also will comeout in console. 1st program – A C++ program which is a random generator that will generate the output as per the requirements of A1’s input and
Segmentation fault when importing a C++ shared object in Python
I have the following shared object: MyLib.cpp That I compile with: g++ -fPIC -shared -o MyLib.so MyLib.cpp I then use it with the following Python script: script.py Like this, it works perfectly, but if I uncomment the line //var = 10;, Python makes a segmentation fault (Python 3.8). This happens every time the object MyClass makes a change to one
Translating a for loop from c# to python (ironpython) [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago. Improve this question I’m translating a chunk of code I have to use, from C# to Python. I’m not fluent in C#. How
how to write C++ DLL file for python correctly?
this is my test.cpp file.(I also used makefile to create dll file) when I run following code in python everything is ok and I get this output from python. but when I change my test.cpp in this way(I just uncommented iostream): I get the following error from python. this is also my dependencies enter image description here by the way
Undefined symbol, despite being defined in linked library (CUDA 10.1)
I have a library my_lib.so which links to several CUDA 10.1 libraries, including libnppicc.so. Running ldd on the library outputs the following – all dependencies are resolved correctly: Next, I have a python bindings library which correctly links against this shared library lib_tf.so. When I try to run a simple python program which imports the python module, I get the
Conversion Between Base 64 String and Byte Array Varies in C# and Python
I have a C# byte array b_a that has 16 byte length. When I convert b_a to base 64 string aaa, it’s length returns 24 I want to convert aaa string to byte array in Python. But When I convert it, it’s length still returns 24. I want to get initial b_a with all. What is the point that I