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
Tag: c++
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
Allocating physically contiguous pages in Kernel Module
I am trying to allocate physically contiguous pages in DRAM using the alloc_pages_exact function. When I try to allocate 10MB of pages, the returned address is always 0. But when I try to allocate 1MB of pages, the allocation is almost immediate. Also, can someone please tell me how to find the exact row size of DRAM? I had to
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
How to pass inputs (not arguments) thorugh command line in C/C++?
Say I have the following simple C++ program, and the following command in terminal: When I run this command, it will ask for my input and I have to copy and paste over the input like the following: Is there a way for this to happen in one pass? I don’t mind copy and pasting each time, however I am
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