Skip to content

Tag: c++

Compiler cannot find header file within header file in C++

I have a header file provided by yaml-cpp library, yaml.h yaml.h: main.cpp All the header files are in the same directory (/home/user/application/libs/yaml-cpp/include), but the compiler is unable to find parser.h and all the other includes. Why is this so and how do I fix it? I have tried using g++ -I/home/u…

SWIG: Access Array of Structs in Python

Say I have the following static constexpr array of c struct: How can I access elements in ns1::ns2::PERSONS in python by using swig? One way I can think of is to create a accessor like const Person& get(uint32_t index) in the swig interface file. Tho, I wonder whether there is a more elegant way that I do…

Kill child process spawned with execl without making it zombie

I need to spawn a long-running child process and then kill it from the parent code. At the moment I do like this: This does the job in the sense that the child process is stopped, but then it remains as a zombie. I tried to completely remove it by adding: to no avail. I must be doing something wrong