Skip to content
Advertisement

Tag: c++

How to start using google tests on a Yocto(Open Embedded) System

I’m doing a project for ARM64 devices and am using Linux Embedded as the OS. I am trying to using Google Tests but when running bitbake, it is failing. Heres the error: I’ve edited the cmake in my src folder and added these components wrt Gtests: CMake for the file containing test case: Answer Already asked on https://unix.stackexchange.com/questions/656529/how-to-start-using-google-tests-on-a-yoctoopen-embedded-system This was

scan-build not working reporting “Removing directory xxx because it contains no report.”

simple buggy code file hello.c run command & result with gcc with clang I can’t understand that the warnning is genereted (maybe by the compiler?), but still why the scan-build is not working? **** UPDATED 06/30/2021 I follow this tutorial, and finnaly get the “python” version of scan-build which is such a misunderstanding, the answer perfectly solved my problem, now

Linker cannot find local shared library

I’m trying a very simple exmaple to create a shared library and link to it. The shared library is as follows: Then the source code file is just as simple: I’m then compiling that into a shared library with: All good, we get an ardgrab.so library so to test it, with the following code in teh same directory as the

Externing a C++ class to avoid including its header file

I have created a static library for the following class, libtgbotengine.a and externed the class to be used in a different project. tgbotengine.h In a different project, I want to link libtgbotengine.a with the following cpp file. My goal is to not to include tgbotengine.h. Is externing myTgBotEngine help me achieve this? project2.cpp Answer The upcoming modules will probably allow

c code to compare two binary files runs on windows but won’t run on Linux [closed]

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 wrote a c code on visual studio to compare binary file to

Should I bother about user might mess up my program’s files?

I am writing a C++ program for Linux which creates some files on the disk during the work. These files contain information about program’s internal objects state, so that the next time the program is started it reads these files to resume previous session. Some of these files are also being read/written to during the execution to read/write some variables

C program to mkdir in POSIX shared memory missing permissions

I have a POSIX shared memory directory which gets blown away on reboot and needs to be recreated on occasion. An example, This creates the directory with missing write permissions for group/others: I’ve tried experimenting with the mode_t flags and even replaced “0777” with “S_IRWXU | S_IRWXG | S_IRWXO”. I do need the directory to have permission flag 0777. Answer

Explain pipe and fork output

I am dealing with pipe and fork in Linux for the first time and I would be happy if someone could explain to me the output of the following program: (which line of code causes the output and is it through the son process or the parent process) The output of the program is: Answer fork() creates a child process

Advertisement