Questions tagged [cpp]
The cpp tag has no summary.
15 questions
-5
votes
0
answers
47
views
I used Generative AI to write up my codes for my Antivirus program (SAFA_AV) can anyone turn this into real c++ programming syntax? [closed]
**
**#include <iostream>
// Include other necessary headers
// #include <accctrl.h> // Ensure this file exists
const char* Add_MSG = "Your System Has Security ...
1
vote
1
answer
792
views
Programmatically query last DHCP lease time
I have a buildroot embedded Linux where I change the ethernet port settings (i.e. disabled, static or DHCP) from a C++ program. When switching to DHCP, it would be nice to determine when (i.e. ...
9
votes
3
answers
3k
views
Box character doesn't display properly in Linux terminal
I was just writing a C++] program that uses the box characters to display information.
I ran the program on macOS and used the terminal app and it worked fine.
When I switched to Debian Linux using ...
2
votes
3
answers
2k
views
How to find the icon file linked to an executable?
I am building a window manager and I need to locate the icons related to a running executable for the taskbar. I found the Icon Specifications and was able to locate all the icons in /usr/share/icons/...
1
vote
1
answer
106
views
How to use Imlib2 in a Cmake project?
I have a Cmake project on arch linux and I need to use Imlib2. However, the cmake cannot find the package (see attached screenshot). Usually, this is resolved by installing the dev version of the ...
2
votes
3
answers
433
views
Xlib. How to make XGrabButton not consume click?
First question so please forgive me if I am neglecting a requirement here.
I am attempting to build a window manager for arch linux. Currently, I am adding grab events before mapping a window.
I have ...
1
vote
1
answer
4k
views
GCC and Clang can't compile C++ code
Trying to run command gcc code.cpp -o runthis
However it gives me errors in this format:
/usr/bin/ld: /tmp/cco6J3Vh.o: warning: relocation against `_ZSt4cout' in read-only section `.text'
/usr/bin/ld: ...
0
votes
2
answers
111
views
SSH session does not get terminated with cpp reboot comand
I have a small cpp application which will reboot the system. This works very well so far.
sync(); //need for data safety
reboot(RB_AUTOBOOT);
Unless you are connected via SSH and run this program on ...
0
votes
1
answer
335
views
cmake and Installing opencv 4.x on Linux Debian 10 with Kernel 4.19.x
I am finding this info. online for building OpenCV 4.x on their homepage. I have not found a way to compile the samples or examples. Is it possible with cmake to install examples from the OpenCV 4.x ...
3
votes
0
answers
208
views
Preprocess the Linux source code and save to another directory
Suppose I have the entire Linux source code in /tmp/linux-src.
After menuconfig I want to do "some kind of gcc -E" where all the preprocessor macros other than #include are expanded so the actual ...
0
votes
1
answer
675
views
Getting error while making dash wallet
I just run successfully run the commands
./autogen.sh
./configure
Then I get some error while running
make
The errors is followings
Making all in src
make[1]: Entering directory '/home/myname/...
0
votes
2
answers
1k
views
header not found even though `PKG_CONFIG_PATH` is set correctly
I've installed a library to ~/.local. The environment variables are set as shown below:
$ echo $LD_LIBRARY_PATH
/home/saga//.local/lib
$ echo $PKG_CONFIG_PATH
/home/saga//.local/lib/pkgconfig
There's ...
1
vote
1
answer
2k
views
HDIO_GETGEO and HDIO_GET_IDENTITY in Linux using C++
Can anyone explain the core difference between HDIO_GETGEO and HDIO_GET_IDENTITY?
From the Linux documentation and this document titled: Summary of HDIO_ ioctl calls., I know that the former is for ...
1
vote
1
answer
5k
views
Installing and compiling log4cpp on Debian
How to install log4cpp framework package stored locally as tar.gz, and which file from that package to use for bulding. I read some articles on internet, but I'm getting stucked at this part:
./...
2
votes
2
answers
2k
views
Error compiling source code, possibly related to cpp
I am trying to compile some source code however when I enter the "make" command in the terminal it produces an error. From my limited understanding the problem seems to arise when the code attempts to ...