Skip to main content

Questions tagged [c++]

C++ is a general-purpose programming language.

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

Can pthread_exit be used with noexcept functions?

I have a model where minimal work happens on main thread, and almost all work happens on worker threads. I want to ensure that the main thread NEVER dies and ALWAYS returns back to the OS. Since, all ...
Wolfie's user avatar
  • 1
-1 votes
1 answer
31 views

How configure Eclipse CDT (for mac) to use Cross Platform g++ on Ubuntu 24

I am running Eclipse CDT 2024-06 on my iMac, which I want to use to develop C++ programs on my Ubuntu 24 Server. How do I configure Eclipse to work "Cross Platform" and use "g++"?
James Martin's user avatar
0 votes
0 answers
118 views

Install GCC 7.20 on Ubuntu 22.04

I saw this question several years ago, but it is worth asking. I have to do a coding test on "GCC 7.2.0 (with -std=c++17)" I have in my Ubuntu: "gcc version 11.4.0 (Ubuntu 11.4.0-...
Al3x4ndru1's user avatar
0 votes
0 answers
15 views

Possible to show a struct/class' body in pop window or buffer

While using lsp-mode in Emacs, I can hover my mouse cursor over a struct type definition (like OpBuilder in this example) and a popup appears. This popup displays a description and declaration of the ...
shijie xu's user avatar
  • 291
-2 votes
1 answer
186 views

How do I change the number of columns and rows in the terminal?

I have been developing a graphic library for generating 2d graphics on the terminal. I need to control the number of rows and columns to specify the resolution.
Francisco Zavala's user avatar
1 vote
1 answer
318 views

How do I install mysql-dev for server?

I am working on a server plugin for MySQL v8.0 (as well as a legacy plugin for v5.7) and I need to install the correct header files. I've looked around the internet and all I can find is ...
Cardinal System's user avatar
0 votes
0 answers
52 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-...
Jairo Lopez's user avatar
0 votes
0 answers
38 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::...
manga's user avatar
  • 1
0 votes
0 answers
49 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
Shubha Ruidas's user avatar
-1 votes
1 answer
588 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.
mrx's user avatar
  • 11
0 votes
0 answers
369 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 ...
Renegade's user avatar
0 votes
1 answer
885 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: ...
RED SOFT ADAIR's user avatar
4 votes
0 answers
269 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 ...
Vipul Gupta's user avatar
0 votes
1 answer
64 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 ...
john's user avatar
  • 151
0 votes
0 answers
213 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: ...
wizard accesories's user avatar
0 votes
0 answers
715 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/ ...
user3554851's user avatar
0 votes
1 answer
4k 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(){...
Foobar's user avatar
  • 609
2 votes
0 answers
262 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 ...
Rohan Pande's user avatar
1 vote
2 answers
3k 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....
Jack Summers's user avatar
0 votes
0 answers
150 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 ...
sleeperservice's user avatar
1 vote
1 answer
150 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....
dma's user avatar
  • 11
0 votes
1 answer
933 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::...
stanley's user avatar
  • 231
-1 votes
1 answer
38 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 ...
FvEldijk's user avatar
  • 357
1 vote
1 answer
2k 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 ...
silent_monk's user avatar
0 votes
0 answers
95 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....
APC1Wi's user avatar
  • 1
0 votes
0 answers
33 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 ...
RajS's user avatar
  • 183
-1 votes
1 answer
1k 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() { ...
user avatar
0 votes
0 answers
69 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 ...
Mr. WhatZitTooYa's user avatar
0 votes
0 answers
71 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 ?
HELP ME's user avatar
  • 191
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 ...
Faisal Mustafa's user avatar
1 vote
1 answer
343 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 ...
Raghav's user avatar
  • 11
0 votes
0 answers
386 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 ...
abbyLunasonde's user avatar
0 votes
1 answer
516 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
dev-one's user avatar
17 votes
2 answers
20k views

clang++ cannot find iostream

Here is a simple code : #include <iostream> #include <algorithm> #include <vector> #include <functional> #include <iterator> #include <iomanip> #include <cmath&...
Thomas's user avatar
  • 551
0 votes
0 answers
815 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 ...
Marietto's user avatar
  • 605
0 votes
0 answers
1k views

Understanding libc++ and libstdc++ packages on Ubuntu

When searching on apt, I noticed that there're lots of similar libstdc++ packages: libc++-1 LLVM C++ Standard library libc++-1-11 libc++-1-12 ... LLVM C++ Standard library libc++-dev LLVM C++ ...
zingdle's user avatar
  • 133
1 vote
0 answers
321 views

Imagemagick C and C++ libraries can't be installed at same time on Ubuntu 22.04

apt install libmagickwand-dev graphicsmagick-libmagick-dev-compat Issue: apt won't install both packages at the same time. apt removes one when I install the other. If I attempt to install both at ...
null's user avatar
  • 1,373
1 vote
2 answers
837 views

ncurses installed... but won't compile code

I've recently returned to Xubuntu 22.04 after a brief stint on Fedora. Under Fedora, I seemed to be able to install ncurses okay. I could then simply write code and compile with commands like: $gcc -...
Lincoln's user avatar
  • 63
0 votes
0 answers
506 views

Error C++ compiling Ubuntu 20.04 LTS

c++: error: unrecognized command line option ‘-GR’; did you mean ‘-R’? c++: error: unrecognized command line option ‘-EHsc’ c++: error: unrecognized command line option ‘-Zm200’ c++: error: ...
Emil Memmedzade's user avatar
1 vote
0 answers
110 views

Snap CLion IDE exits on run

I installed snap package of CLion IDE, when I launch it from ULauncher it exits upon clicking run, however when I run it from the terminal it seems to work just fine, what could be the cause of this? ...
ararune's user avatar
  • 31
1 vote
1 answer
2k views

Running aplications that require the c++ redistributable for Visual Studio 2015

I am using Ubuntu 22.04 . I can't figure out how to run applications that require the C++ redistributable for Visual Studio 2015 to run. What do I need to do to run them? I have tried wine and it didn'...
ehab Mohammed's user avatar
1 vote
0 answers
166 views

Error running cuda with opengl

I am trying to compile julia example code using the command "nvcc -lglut julia.cu -o julia" and getting the following error Starting build... /usr/bin/ld: /tmp/tmpxft_00004758_00000000-...
user2719731's user avatar
15 votes
1 answer
14k views

Compiling C++20 program that uses modules with Ubuntu 22.04

I'm trying to run a simple program: import <iostream>; int main() { std::cout << "Hello, World!" << std::endl; return 0; } I've checked, and supposedly I've already have ...
An old man in the sea.'s user avatar
0 votes
1 answer
300 views

Weird symbols while trying to move the cursor in text written in console

i am new to Ubuntu. I was running a c++ executable but i encountered this problem, the program asks for a written input but when i try to move the cursor with the arrow keys through the thing i wrote, ...
Diego Huite's user avatar
0 votes
0 answers
83 views

upgrading code to a higher version of cpp

Started my carrier as c++ coder recently. I am working on a project to create docker image of my project. During compilation I am getting below Error continuously, tried multiple ways. the current ...
error's user avatar
  • 9
2 votes
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 ...
Mahir's user avatar
  • 414
0 votes
0 answers
642 views

API for Telnet Client in C++

My apologies if this is not the right place to ask my question. I am communicating with a telnet server on my local network. Please note that, the communication is working fine using the telnet ...
ravi's user avatar
  • 283
0 votes
0 answers
572 views

How to link to different version of a shared object (.so) on different version of Ubuntu?

I have developed a program which links to ncurses-dev and I made a .deb installer for it. On Ubuntu 18, my main binary links to libncurses.so.5, but on Ubuntu 20, libncurses.so.6 exists instead of ...
Felix F Xu's user avatar
10 votes
4 answers
47k 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 (...
oofmeister27's user avatar
1 vote
1 answer
4k views

Can't find -lGL from /usr/lib/ld

Whenever I try to compile Code::Blocks' C++ projects I get this error: /usr/bin/ld: cannot find -lGL I've tried installing following packages in accordance to other solutions to this problem: fglrx-...
Jabu-Jabu's user avatar

1
2 3 4 5
16