Questions tagged [c++]

C++ is a general-purpose programming language.

Filter by
Sorted by
Tagged with
1 vote
1 answer
45 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
-1 votes
0 answers
32 views

MCP2221 use in c++

I bought an Adafruit MCP2221 board to have some analog GPIO for a project. The examples that Adafruit give is by disabling the kernel drivers, however i would prefer to use kernel drivers due to wider ...
chriskoups's user avatar
0 votes
0 answers
115 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
124 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
0 votes
0 answers
5 views

Can´t Install g++ correctly | No puedo instalar g++ correctamente [duplicate]

Soy nuevo en todo el sistema de Linux, pero como nos lo ha mandado la Universidad me lo he tenido que descargar. Para ello no has hecho descargarnos una Máquina Virtual (VirtualBox) y dentro de ella ...
Raul Soler's user avatar
0 votes
0 answers
67 views

Install gcc-9-arm-linux-gnueabi and make it default

for cross-compilation, I want to install gcc-9-arm-linux-gnueabi on a Jammy Amd64 machine. Installing gcc-arm* will only give me version 11 of the compiler. However, I want to install arm gcc and g++ ...
Desperado17's user avatar
7 votes
1 answer
3k 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
  • 301
0 votes
0 answers
299 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
  • 453
0 votes
0 answers
317 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
110 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,351
1 vote
2 answers
180 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
  • 53
0 votes
0 answers
302 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
0 votes
0 answers
33 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
  • 11
0 votes
1 answer
177 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
72 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
0 votes
0 answers
41 views

defsym reference incorrect when accessing from C++ program in 18.04 but not 16.04

I have symbols, defined in my makefile to represent the build version and date, however when I access them in my C++ program, the values are incorrect due to an offset being applied. My linker command ...
user5265160's user avatar
14 votes
1 answer
7k 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
-1 votes
1 answer
76 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
113 views

How can I set my ubuntu login use ukey and pin instead of username and password

I want do something like just use ukey and pin to login my ubuntu rather than username and password but now,I need use ukey and password at the same time, by the way I also want realize a function ...
siyerufeng's user avatar
0 votes
0 answers
63 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
0 votes
1 answer
2k 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
  • 365
0 votes
0 answers
18 views

Connecting to ydi cam

Hi ! What is the problem ? I have a ydi 4k cam (seems to be the same as this, if it's not exactly the same) A while ago, it started to stop working (the screen died), and for other reasons, I bought ...
FoxOne's user avatar
  • 1
0 votes
0 answers
355 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
  • 213
0 votes
0 answers
358 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
6 votes
3 answers
20k 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
0 votes
0 answers
231 views

Compiling GLFW project in Code::Blocks

I'm trying to make an OpenGL project according to this tutorial. It's prioritized for Windows, but claims it works for Linux too with a few alterations and usually explains them. This is what I've ...
Jabu-Jabu's user avatar
0 votes
1 answer
1k 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
341 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
111 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
342 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
  • 2,798
0 votes
2 answers
1k 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
  • 101
0 votes
0 answers
650 views

run visual Studio sln file in ubuntu

I have a project of c++ with .h files which were made in windows visual studio and have .sln file also, Now I want to run the whole project in ubuntu, I actually want to run the .sln file here so that ...
Muhammad Aamir Khan's user avatar
0 votes
0 answers
87 views

Update system gsettings programmatically in C++

I'm running a service that needs to update the system wide proxy settings on Ubuntu. $ gsettings set org.gnome.system.proxy.http host 'my.proxy.com' $ gsettings set org.gnome.system.proxy.http port ...
anshah's user avatar
  • 1
1 vote
1 answer
633 views

How to git clone (done), Cmake build (almost done) and run a C++ Project in Ubuntu

This is my first day in Ubuntu (20.04.4 LTS) for C++ development. Previously I only used Windows, and find something new to work with. I would appreciate your support. After cloning a github repo, I ...
bim's user avatar
  • 111
0 votes
1 answer
175 views

I have been trying to make a custom shell with C++. It is working but it doesnot work when Pipe or > are given in the terminal

#include <iostream> #include <cstring> #include <unistd.h> #include <sys/types.h> #include <sys/wait.h> using namespace std; int main() { char exitC[] = "exit&...
Umar Azhar's user avatar
1 vote
1 answer
2k views

Magick++.h: No such file or directory (Even after installing Magick++)

I am using a WSL Ubuntu terminal. I executed the following command to install Magick++: sudo apt-get install libmagick++-dev After this, I checked to make sure that Magick++.h has been installed or ...
big tree's user avatar
0 votes
0 answers
152 views

Executing a C++ code in directories with specific name through bash script

I have a directory, named test, with 10 folders, named folder1, folder2, etc., and each folder has subfolders named trial01, trial02, trial03. Now I have a master C++ file, named mastercfile.cpp, ...
Alakesh Upadhyaya's user avatar
3 votes
0 answers
2k views

C++ fmt library not working

Hi guys I'm a C++ beginner and I just found that the fmt lib is really interesting. But I ran into a problem when trying to use it. I used homebrew to install fmt lib brew install fmt .I check the fmt ...
WilliamB's user avatar
0 votes
0 answers
135 views

insmod: ERROR: could not insert module ./gspca_kinect2.ko: Unknown symbol in module

I tried to compile and run the driver "gspca-kinect2" because I want that my kinect 2 is detected as webcam inside obs and skype,but as u can see below,it does not work : marietto@marietto-...
Marietto's user avatar
  • 453
-5 votes
1 answer
61 views

Coding on VS code [closed]

Hello this is my first time to learn C by a book But The code doesn't give output I installed build essential What should I do ? int main() { printf("Hello World!"); }
Mahmoud Ahmed's user avatar
0 votes
1 answer
490 views

Where do software get installed on Linux? What is the difference between /opt and /usr?

I would like to clarify the software application and libraries installation philosophy and best practices in Linux. From my understanding from the Filesystem Hierarchy Standard (FHS), new software ...
Ahmad Abuaish's user avatar
1 vote
1 answer
810 views

/usr/include/x86_64-linux-gnu/sys contains only broken symbolic links

My O/S is Ubuntu 20.04. The initial problem: I was trying to run a "make" and got errors like: /usr/include/sys/cdefs.h:453:10: fatal error: bits/long-double.h: No such file or directory ...
Achim Schmitz's user avatar
2 votes
0 answers
220 views

problem with making a c++ project with G++

I am trying to build cascade library using G++ 8.3.0. In the documentation they mention that it was tested on G++ 4.7.2. My question is, is it necessary to downgrade to 4.7.2? if so could you please ...
student_11's user avatar
0 votes
0 answers
3k views

Cmake can't find gcc compiler

I have Ubuntu 18.04.6 LTS and I am trying to install and run gcc v8 (a v7 version is the default). I have done: sudo apt-get install build-essential sudo apt-get install gcc-8 To try to get the v8 to ...
Robb's user avatar
  • 1
1 vote
0 answers
748 views

Unable to correct problems, you have held broken packages while installing gcc [duplicate]

i can't install this on my Ubuntu 20.04 LTS :~$ sudo apt install gcc Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be ...
Ziyad Saeed's user avatar
0 votes
0 answers
125 views

Unable to correct problems, you have held broken packages. when installing c++ [duplicate]

So I'm trying to install c++ and I keep getting this error sudo apt install g++ Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not ...
Ziyad Saeed's user avatar
0 votes
1 answer
868 views

Difference between packages libxml2-dev and libxml2

I have simple C++ application that uses libxml2 library. For this purpose I need to install it. But which package I need to install: sudo apt-get install libxml2 System still complains regarding ...
vico's user avatar
  • 4,367
0 votes
1 answer
836 views

How to fix the X Window System error coming when running a c++ GTK program

I am getting an error while running a program written in c++ in GTK. The program stops when this error appear. I am a beginner and i have no idea what to do for this. The error is as follows. (main:...
Dilshan Madulanka's user avatar
0 votes
1 answer
779 views

Upgrade gcc version in Ubuntu 18,04

I'm running Ubuntu 18.04 in WSL, which I use to compile my c++ programs. I need to write a program that gets the name of all the files in a certain directory and adds them into a vector of strings. ...
Mateoglzc's user avatar
2 votes
1 answer
1k views

Cross compile C/Cpp application for target ARM arch support ubuntu18.04 32-bit, on host machine i.e. ubuntu 18.04 64-bit machine using cross compiler

Trying to achieve the below task Cross compile C/Cpp application for target ARM architechture supports ubuntu 18.04 32-bit on a host machine i.e. ubuntu 18.04 64-bit machine using cross compiler. ...
Harsh's user avatar
  • 25

1
2 3 4 5
16