Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 3 years ago. Improve this question If I see a struct, typedef, const, or any other variable
Tag: c++
Problem doing a system call, the system call is not displaying to kernel
In Ubuntu, I wrote a new system call: This is my testing file: But the testing file is good. The system call is not doing anything and I cannot see why. What am I supposed to do that I am doing wrong? I don’t really have anything left to find. I checked the testing file and it runs properly. It
Linker can’t find Lua library definition
So, I’m relatively new to C++ and I’ve been trying to run Lua files in my C++ project. To start off things, I ran this simple code: And the terminal command looks like this: Edit: Corrected to this Lua libraries are installed on my system (Linux), but the linker can’t find the definition for luaL_newstate(), despite the fact that I
While trying to retrieve the AccesToken using HttpClient I am getting an error
While trying to retrieve the Acces Token from a windows server using HttpClient I am getting an error: “GSSAPI operation failed with error – An invalid status code was supplied (SPNEGO cannot find mechanisms to negotiate).” system.ComponentModel.win32Exception is throwing as GSSAPI operation failed with error – An invalid status code was supplied (SPNEGO cannot find mechanisms to negotiate) The above
C++ setenv resolve other variables
I am using c++ and setenv to set a variable like in this program below: The output I get is “TEST=$HOME/test”. However I want the output be like “TEST=/home/toboxos/test”. I found nothing using the linux manual. Is there any function resolving the environment variables or have I to do this by myself? Answer This substitution you’re expecting is a feature
The use of const char* vs. string literals
I’m using an external Modbus library – written in C – to connect to a microntroller Modbus slave from a Linux machine, using a serial connection. I’m also using wxWidgets to create an application on the Linux machine, which runs a Modbus master in the background. One of the Modbus functions accepts the name of the serial port the Modbus
makefile : How to link object files
I have makefile and I need to link two objects into “main” object They are -> oglinet.o and libshape.o their path in system -> home/pi/openvg/ Problem :I need to write full path and objects name(home/pi/openvg/libshapes.o) is possible to “make” them as Makefile variable for example home/pi/openvg/libshape.o into $(OBJ1) in makefile rule ? Tried to make them as variable for example
How much memory a program can allocate?
How much memory can I allocate for a C++ program running under Linux? In my test case, using new or malloc can allocate more than 170Gb of memory. As a comparison, The same code can only allocate 1.8G in windows and then terminated. My test machine, one is a virtual machine using virtual box, centos7 64-bit, 2Gb memory. The host
error: static assertion failed: std::thread arguments must be invocable after conversion to rvalues
I am trying to add a std::function to std::thread and i stumble upon this error Why is this not working? Answer The initial integer value is missing when thread ctor is called: thread(std::ref(tfunc), 123). Function of thread body takes integer, you need to provide it when thread starts.
Prevent read() systemcall returing with 0 when run as background process
I have a piece of software that is able to read commands from stdin for debug purposes in a separate thread. When my software runs as foreground process read behaves as expected, its blocking and waits for input by the user, i.e the thread sleeps. When the software is run as a background process, read constantly returns 0 (possible EOF