Skip to content
Advertisement

Tag: c++

error while loading shared libraries: libgmock.so: cannot open shared object file: No such file or directory

I am currently facing an issue with a project of mine foudn while configuring CI. Resume The problem faced is the following: error while loading shared libraries: libgmock.so: cannot open shared object file: No such file or directory. For the problem above I am not installing the google test/google mock framework but I am compiling it. Although it says it

BUILD_BUG_ON_ZERO not working in a simple user space application

I tried to use BUILD_BUG_ON_ZERO in a simple user space application and it is failed to compile Can anyone please provide me hints on the error. Answer The macro BUILD_BUG_ON_ZERO is intended to be used with a constant expression as defined in 6.6 constant expression. i isn’t a constant expression – it’s just a local variable. Even const qualified objects

x86_64-conda_cos6-linux-gnu-cc: Command not found with postgres function makefile

I am trying to do this tutorial: https://linuxgazette.net/139/peterson.html so I can learn to write postgres functions. It says to use this makefile, which fails: Errors: I have tried several things, including updating conda and anaconda, as per the answers to similar questions. Nothing has worked yet. How do I compile postgres function given this situation? Answer This error has occurred

Execute binary file inside C code (No system())

I am trying to execute a binary executable file inside C code without using system since it has security and resource management issues. The system used here is Debian Buster with kernel 5.4.0-2-amd64 and gcc 9.2.1. I used the method in this question: execute binary machine code from C which is to convert executable into hexadecimal code with xxd -i,

strstr() and exit(0) trouble in C

so I’m working on a simulated linux shell using C (homework), and I have it exiting the program if the user just simply types in “quit”. However, if they throw “exit” somewhere inside a command… “cat file ; exit” I need it to execute the command like normal, then quit. I know that I still have to filter the string

Advertisement