Questions tagged [c++]
C++ is a general-purpose programming language.
789
questions
3
votes
2
answers
5k
views
How can I run an c/c++ program that use GNU Scientific Library (GSL)?
I'm trying to run 2 simple examples in c/c++ using the GNU Scientific Library.
That are the codes:
1st: An Example Program
#include <stdio.h>
#include <gsl/gsl_sf_bessel.h>
int main (...
5
votes
1
answer
18k
views
CXXABI_1.3.8 not found
So, I'm trying to run heroes of newerth and get the error
./hon-x86_64: /home/c0ding/HoN/libs-x86_64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/x86_64-linux-gnu/libicuuc....
6
votes
2
answers
4k
views
Getting the most recent releases of gcc / g++ (11.0 or 10.2) on Ubuntu 20.04 LTS
I'd like to get the latest releases of g++ (and clang) via package manager (apt).
Currently I need to compile gcc/g++ on my own which needs really a lot of time.
Are there any repositories with "...
0
votes
0
answers
23
views
When testing my snaptd start, it comes out as Transport endpoint is not connected
root@DESKTOP-O8V2BMI:~# sudo service snaptd start
Failed to start snaptd.service: Transport endpoint is not connected
See system logs and 'systemctl status snaptd.service' for details.
root@DESKTOP-...
0
votes
1
answer
5k
views
CodeBlock c++ problem: Procces returned 126 (0x7E)
I'm having a problem with CodeBlocks.
I can't run any C++ code and every time i try, I get the following error in terminal
Process returned 126 (0x7E)`
I googled it and found this link: http://...
1
vote
1
answer
6k
views
How to install the program gr-gsm?
I am trying to install a program named gr-gsm on my system. So, I followed the official guide from here but when I entered the command cmake .. (while following the installation guide) it returns this ...
0
votes
0
answers
28
views
openauto compiling error
the link of error pic
/usr/include/c++/9/ext/new_allocator.h: In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = f1x::openauto::autoapp::...
-1
votes
1
answer
179
views
How to install `g++12` on Ubuntu 20.04.6?
How can I install g++12 on Ubuntu 20.04.6?
I tried a few ways on google but none seems to work.
0
votes
0
answers
38
views
Cin Function in xeus-cling in ubuntu
the xeus-cling functions well for output but it is not providing any input box.
like this so how can i try to run the c++ so that it can take input also
0
votes
1
answer
6k
views
How to compile and run c++ program from Kate editor using build tool?
I'm trying to compile and run a c++ program from Kate editor with the following build command.
konsole -e g++ -std=c++14 -Wall -c %f -o %n.o && chmod +x %n.o && ./%n.o
But it gives ...
0
votes
0
answers
121
views
#include <QtWidgets>: no such file or directory
Please don't crucify me. ChatGPT or Google did nothing, so here I am. Basically, I cannot use QtWidgets in my C++ code (for some reason).
The problem: When I include the header in C++, I get this ...
1
vote
1
answer
5k
views
CrossCompiling with libboost for ARM architecture
I am using a 32 Bit Ubuntu system and my goal is to compile my C++ program for arm architecture (beagleblack). However, my C++ program needs libboost meaning I get errors like this while compiling:
/...
0
votes
1
answer
420
views
Eclipse Build: undefined reference to `lstat@GLIBC_2.33'
Im porting a command line application from windows to linux.
This application uses some 3rd Party closed source libraries.
Using one such library (with a .so file) i get a number of linker errors:
...
0
votes
1
answer
7k
views
CMake cannot find libboost
There seems to be a LOT of CMake can't find Boost questions. However, I find none of the solutions worked for me. So perhaps I can print my details and see if someone can spot the issue?
I am on ...
4
votes
0
answers
214
views
How to detect events like Sleep/Wake in linux
I am wondering if there is any way to detect system wide events under linux such as:
sleep
wakeup
I need this for a project where i programmatically react to such events, but i am uncertain how and ...
0
votes
1
answer
57
views
How to run this C++ code in ubuntu?
I have compiled this code: https://github.com/vbdaga/Rabbit-Cipher/blob/master/rabbit.cpp
with g++ rabbit.cpp -o Rabbit but there are nowhere instructions on how to pass the arguments. I see only ...
2
votes
3
answers
16k
views
c++ boost library problem: cannot find -lboost_system ld returned 1 exit status
I have a problem with boost. After I installed boost with following command
sudo apt-get install python-dev
sudo apt-get install libboost-python1.54
sudo apt-get install libboost-system1.54 ...
12
votes
6
answers
99k
views
Can't execute .out files, getting permission denied
I have written a C++ program and complied it to produce a.out file. However, whenever I try to run it, I get Permission Denied. I read that we can use sudo, but I can't quite get it to work. I use ...
0
votes
0
answers
137
views
unable to compile anything after installing cpr library #
sudo g++ -o /usr/local/bin/t1 '/home/ubuntu/Desktop/test1.cpp'
I am encountering an error while attempting to compile any cpp file, regardless of which one it is. The error message reads:
"as: ...
0
votes
1
answer
2k
views
ld.lld: error: unable to find library -lstdc++
CMake is complaining that I don't have a working c++ compiled because of the error:
ld.lld: error: unable to find library -lstdc++
I've narrowed it down the following:
Given the program int main(){...
0
votes
0
answers
403
views
How to install glibmm-2.68 on Ubuntu 22.04
I am trying to install GTK4/GTKMM4 for C++ on Ubuntu 22.04 but I am stuck on step 3, possibly step 2.
I am following these instructions:
https://terminalroot.com/how-to-install-gtkmm-4-on-ubuntu-2204/
...
14
votes
2
answers
16k
views
clang++ cannot find iostream
Here is a simple code :
#include <iostream>
#include <algorithm>
#include <vector>
#include <functional>
#include <iterator>
#include <iomanip>
#include <cmath&...
2
votes
0
answers
178
views
Is there any way to ensure that few symbols of static library get definitely loaded into .so file?
We have a huge amount of cpp files and taking a piece of code where we need some clarification regarding that. As we have cpp files we compile those into multiple static libraries and those result ...
9
votes
4
answers
41k
views
GLIBCXX 3.4.30 not found in conda environment
I am installing a package with pip in my conda environment and I keep getting this error:
ImportError: /home/anavani/anaconda3/envs/dmcgb/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (...
0
votes
2
answers
2k
views
g++ -- Undefined Reference to main in 86_64-linux-gnu/Scrt1.o:
I am trying to compile a simple C++ Hello World program to test my environment, however, whenever I try, I get this Error:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/Scrt1....
0
votes
0
answers
91
views
Why does accessing thread-local-storage (TLS) in library loaded by statically linked dlopen segfault?
I have an exe linked with gcc -static that uses dlopen to load a shared library. The library tries to access a variable in thread-local-storage (TLS). Running the application segfaults when we attempt ...
1
vote
1
answer
131
views
STDIN redirection issue in ubuntu 20 (works in ubuntu 18)
I have a script that runs my application (c++) with STDIN redirected from a fifo and redirects STDOUT to a file.
The following code runs just fine on ubuntu 18:
./my_app 0</home/user/pipe 1> log....
0
votes
1
answer
583
views
How to make g++ use the C++20 language standard when compiling from code-blocks in Ubuntu 22.04
Just started learning c++ and it is recommended to compile code using the c++20 standard and use code::blocks as the editor.
I checked the man pages of g++ and it is using c++17. I am using code::...
-1
votes
1
answer
34
views
Why does c++ app launched from the Netbeans use Netbeans install dir?
When I run a simple application that uses a library, Ogre3D in my case, from NetBeans, it breaks with the following message:
Error occurred during execution: InternalErrorException:
Could not load ...
1
vote
1
answer
1k
views
Considerations when upgrading Ubuntu from 18.04 to 22.04 -- software development POV
I have been using Ubuntu 18.04 LTS for over three years now and have been considering moving to newer LTS versions for some time. However, the thought of working software breaking or requiring changes ...
-3
votes
2
answers
2k
views
I can't run C++ code
I Can't Run Program
Error message :
Here's the code:
#include <iostream>
using namespace std;
int main()
{
cout << "C++";
return 0;
}
0
votes
0
answers
66
views
OpenCV imgproc not found
i am trying to compile a OpenCV Application for an ARMs target.
I crosscompiled all the libraries but when i try to compile my code:
#include<opencv2/imgcodecs.hpp>
#include<opencv2/highgui....
0
votes
0
answers
28
views
Why my CPU frequencies high but application performance is poor
I have two similar raspberry pi running Ubuntu with little difference in their configuration. I am trying to monitor their performance for running my application. So I am running my app on both ...
0
votes
1
answer
507
views
How can I view the C++ code result in terminal instead of xterm
I have just started to learn C++
and I am using code block to do all the work of c++.
but when the code is run the result is displayed in something called XTERM.
I would be happy to know if there is ...
2
votes
3
answers
2k
views
Can't run projects in Codelite
I have installed Ubuntu 18.04 alongside Windows 10. I'm now trying to use CodeLite to code C++, but when I create a project in my hard drive partitions I can't run it. It says no such file or ...
2
votes
1
answer
2k
views
Qt5 - how to use Free? Asking for money
I need to use Qt5 till i release my final version, my client wont pay until he see the whole application is stable and not having any issue. But Qt5 is asking money before even i get a client.
In ...
-1
votes
1
answer
957
views
Identifier cout is undefined
I am compiling below code with GCC-12 compiler on Ubuntu 22.04 LTS. I have 2 different versions of GCC installed on my machine 11 and 12.
#include <iostream>
using namespace std;
int main() {
...
4
votes
1
answer
7k
views
GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference
When trying to execute any c++ programs, I get this error. The full error message is:
./main: relocation error: ./main: symbol _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev, version ...
0
votes
0
answers
59
views
Some of my applications broke after a software update
I really hate to be that kind of guy, but I have struggled with this for a couple of days and its stressing me really out. I would say that I am fairly knowledgeable about technical things and not ...
0
votes
0
answers
328
views
Building C++ program with i2c-dev lib
I have been trying to build a C++ program using the i2c-dev.h library on Ubuntu Core 22.04.02 LTS, so I can read and write I2C packets. But I can't get my program to build correctly. I tried including ...
0
votes
0
answers
160
views
Cannot build native apps after upgrading to 22.04 from 20
It seems that I get stuck going down a rabbit hole when I try to build anything depending on ffmpeg, avlib, and gstreamer since switching to ubuntu 22; its incredibly frustrating and I wonder if the ...
0
votes
0
answers
61
views
Utility to detect defect C/C++ compiled/object file
Is there a Linux utility to detect a defect C/C++ compiled/object file interrupted amidst its compilation progress ?
How its simplest usage ?
1
vote
2
answers
1k
views
Cannot build darling
I was trying to install darling on Ubuntu 22.04.2 LTS. When I run the following command:
:~/darling/build$ cmake ..
The following error occured:
-- Detecting CXX compiler ABI info
-- Detecting CXX ...
0
votes
1
answer
410
views
Vulkan MAILBOX present mode
Does Vulkan MAILBOX Present mode exist on the NVIDIA driver for linux?
Using latest proprietary driver 525.
Computer Alienware with RTX 3060
1
vote
1
answer
259
views
Syntax error in object.h file from python3.10-dev package
I am writing a code to edit Sqlite database from c++ and then using PyBind11 to use the program with python. I installed PyBind11, built it till here no issue but when I am building the code it shows ...
1
vote
2
answers
2k
views
C++ threads fail on ubuntu 22.04
Given this bug.cpp file:
#include <thread>
int main() {
auto t = std::thread([] {});
t.join();
return 0;
}
And this docker container:
FROM ubuntu:22.04
RUN sed -i -e 's/^APT/# APT/' -e 's/...
3
votes
1
answer
4k
views
Using arc4random on Ubuntu 14.04 trusty
I am currently working with a C++ program where I wish to use arc4random function. Every time I compile, I receive a not declared in scope message for arc4random. I understand that this is an error in ...
0
votes
2
answers
1k
views
Is there an IDE which can compile old C++ programs?
I was taught the old version of C++ in school -- the one which uses iostream.h instead of iostream. I can't use iostream and namespace stuff. I am seeking an IDE which can compile my programs in that ...
-1
votes
1
answer
705
views
Recommendation for framework to develop C++ application on Kubuntu
I'm planning to develop an application to serve as a toolkit (for thing I commonly use) for my KUbuntu machine.
I have looked at the QT framework, but can't find any really good guides for development....
0
votes
0
answers
623
views
cc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found
Hello to everyone and happy new 2023.
This question starts with a problem strictly related to the FreeBSD world,but ends with a problem strictly related to the Linux world. You will see,so don't start ...