Skip to content
Advertisement

Tag: c++

Undefined reference to `main` error when embedding Python in C++

I’m trying to embed Python in C++. This is my Python file (with the name EmbedTest.py): This is my C++ file (with the name EmbedTest.cpp and located in the same folder as EmbedTest.py) Compiling is fine. I use the flags suggested by python3.6-config –cflags. Hence gcc -c -I/home/MyFolder/anaconda3/include/python3.6m -Wno-unused-result -Wsign-compare -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -O3 -pipe -fdebug-prefix-map==/usr/local/src/conda/- -fdebug-prefix-map==/usr/local/src/conda-prefix -fuse-linker-plugin

CUDA(GPU) as OpenCV backend

Am trying to use CUDA as backend for dnn module provided in opencv-4.1.1 , I have build opencv with CUDA enabled, nvidia drivers and CUDA is properly placed on system, here am using manjaro as development platform. am trying to load pre-trained YOLOv3 weights using cv2.dnn module, But it uses CPU as defualt inference engine, but am trying to use

Python boost to-Python converter for class already registered second conversion method ignored

I have next class (it was simplified): I have python boost module: Python script is called from dll library and uses container from pyd py_classes. When dll-library is called first time std_vector_value type is used without any problems. When I reload dll-library inside executable I get next warning: So, it means: When dll-library is loaded first time, to-python converter is

Logging with Python, ROS, and C++

I have a codebase of Python and C++ code, including heavy use of ROS. Logging is done throughout the Python code with both system logger and rospy logging — contrived example: As for C++ code we need to add logging, probably with glog but I’m open to other options. Is there a way to integrate the various loggers into one

Reading a C-struct via sockets into python

On an embedded device running a C application, I have defined this struct: On request, I send this struct via sockets: and read it from a Python script on my desktop: This is the data printed to console on my desktop: How can i reassemble the data into a YourStruct? Note that the embedded device uses little endian, so I

Advertisement