Questions tagged [c++]

C++ is a general-purpose programming language.

Filter by
Sorted by
Tagged with
1 vote
1 answer
93 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
30 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
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::...
manga's user avatar
  • 1
0 votes
0 answers
39 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
210 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
164 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
488 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
224 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
58 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 ...
just_learning's user avatar
0 votes
0 answers
148 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
461 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
3k 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
  • 599
2 votes
0 answers
199 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
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....
Jack Summers's user avatar
0 votes
0 answers
97 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
135 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
635 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
35 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
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 ...
silent_monk's user avatar
0 votes
0 answers
71 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
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 ...
RajS's user avatar
  • 163
-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
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 ...
Mr. WhatZitTooYa's user avatar
0 votes
0 answers
62 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
0 votes
0 answers
162 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 ...
Paul Gregoire's user avatar
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
264 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
334 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
430 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
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&...
Thomas's user avatar
  • 501
0 votes
0 answers
647 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
  • 575
0 votes
0 answers
865 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
0 votes
0 answers
248 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,361
1 vote
2 answers
678 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
425 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
69 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
1k 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
141 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
12k 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
251 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
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 ...
Mahir's user avatar
  • 395
0 votes
0 answers
586 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
  • 233
0 votes
0 answers
520 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
9 votes
4 answers
42k 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
3k 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 vote
0 answers
430 views

/usr/bin/ld: cannot find -lopenblas collect2: error: ld returned 1 exit status

I am trying to compile a C++ program that uses Armadillo C++ library for linear algebra & scientific computing. When I give command : g++ gen_data.cpp -o test -DARMA_DONT_USE_WRAPPER -lopenblas -...
Abhishek's user avatar
1 vote
1 answer
271 views

Output not showing in my ubuntu while compiling c

While compiling my C code in sublime-text in my Ubuntu The output is not shown.enter image description here
Gopal Adhikari's user avatar
0 votes
1 answer
1k views

VS Code CPP Extension hogs up the CPU constantly / Infinite loop in the Intellisense process

I'm working with vs code and it's cpp extension under Ubuntu 18.04. However after starting the app one CPU is under full load, although I'm not doing anything. The CPU fan is driving me crazy! The ...
mcExchange's user avatar
  • 3,118
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/...
gnzlbg's user avatar
  • 111

1
2 3 4 5
16