Skip to main content

Questions tagged [c++]

C++ is a general-purpose programming language.

Filter by
Sorted by
Tagged with
128 votes
5 answers
974k views

What is a command to compile and run C++ programs?

I am new to Linux. I am using Ubuntu 11.04 and do not know how to compile and execute C++ program in it. I need to know the commands to Compile and Execute a C++ program in Linux.
user avatar
46 votes
3 answers
124k views

Where do I find the core dump in ubuntu 16.04LTS?

I have a C++ program that does what it is supposed to do, but there must be some problem with pointer, since it crashes at the end and creates a core dump. My problem is that I cannot find the core ...
mattiav27's user avatar
  • 895
35 votes
4 answers
97k views

How to install gcc-7 or clang 4.0?

I want to try C++17 features and I want to install standard compliant compiler (preferably GCC). I'm totally new to Linux and Ubuntu and I simply don't understand a lot. I tried to follow https://...
nikitablack's user avatar
29 votes
2 answers
22k views

How to build a simple chat using netcat?

I am currently working on a project and I have implemented a simple chat application using the netcat libraries. The client is prompted to enter port number and the command nc -l -p xxxx where xxxx ...
Sachin S Kamath's user avatar
28 votes
2 answers
32k views

Installing and using universal-ctags instead of exuberant-ctags

How could I switch from exuberant-ctags to universal-ctags. I am using Ubuntu 16.04 LTS and ctags --version reports Exuberant Ctags 5.9~svn20110310, Copyright (C) 1996-2009 Darren Hiebert
NexusStar's user avatar
  • 573
27 votes
1 answer
267k views

How to install g++ compiler?

I have tried the following: sudo apt-get install build-essential Reading package lists... Done Building dependency tree Reading state information... Done build-essential is already the newest ...
Siddharth Bhardwaj's user avatar
24 votes
2 answers
218k views

How to compile C++ source code ("iostream.h not found" error)?

I do not want to discuss about C++ or any programming language!I just want to know what am i doing wrong with linux ubuntu about compiling helloworld.cpp! I am learning C++ so my steps are: open ...
gabriel's user avatar
  • 1,076
23 votes
3 answers
6k views

Is it possible to use Python with the Ubuntu SDK?

David Planella wrote in his answer to a question I posted that: ...the recommended way to develop apps for Ubuntu is the Ubuntu SDK. So I installed it, but looks like the supported programming ...
Zignd's user avatar
  • 10.8k
22 votes
2 answers
67k views

Fatal error: gl/glut.h: no such file or directory

I'm attempting to write a program and I keep getting this error: Fatal error: gl/glut.h: no such file or directory I've read through other similar problems that people were having, and nothing has ...
user257098's user avatar
21 votes
1 answer
44k views

Where to install libraries manually?

I want to install SFML (a free multimedia C++ API) on my Ubuntu system, which basically isn't a problem. But I wanted to know where I should store the files. I can see, that Ubuntu stores my C++ ...
Stefan Falk's user avatar
19 votes
5 answers
15k views

Run system commands from QML App

I want to run a system command from inside my application. It's suppose to run a command on a remote server using SSH. But that's not really the point. The point is that I don't know how to run any ...
Daniel Holm's user avatar
18 votes
2 answers
46k views

How to set Clang 9 as the default C++ compiler on Ubuntu 19.10?

how do I set Clang 9 as the default C++ compiler on Ubuntu 19.10? I searched the internet, but nothing helped. Thank you for answer :)
user avatar
17 votes
1 answer
23k views

Installing clang 5.0 and using C++17

I have been trying for 3 days to install clang 5.0 on an Ubuntu 16.04 machine. I have tried various guides, but nothing seems to work. When I try to simply grab the latest from SVN and build/install (...
Steve D's user avatar
  • 267
16 votes
2 answers
19k 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
  • 531
16 votes
2 answers
50k views

How do you find libraries (C++) in Ubuntu?

Sorry, this is such a beginner question, but I've recently begun programming with C++ on Ubuntu 12.10 and I've installed a few libraries I need to work with, for example PCL and I can't find them to ...
Bora George's user avatar
15 votes
4 answers
37k views

How to install g++ 5.1 on Ubuntu desktop 15.04 64-bit?

I'd like to experiment with the new GCC 5.1 C++ compiler on Ubuntu. So, I downloaded and installed Linux Ubuntu desktop 15.04 64-bit in a virtual machine. Then, in the terminal, I entered the ...
MikePro's user avatar
  • 153
15 votes
2 answers
4k views

Can I act on the event that a window opens without polling?

I am trying to find a way to detect the event of a window (any window) being opened in Ubuntu 16.04 I would like to be able to detect the "window open" event and check if the opened window was my ...
Christian Eriksson's user avatar
15 votes
1 answer
13k 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
14 votes
4 answers
12k views

Receiving error while trying to debug in QtProject

I installed the latest version of the QtProject so now I can debug C++ code. While trying to debug for the first time I got this error: ptrace: Operation not permitted. Could not attach to the ...
user124009's user avatar
13 votes
4 answers
42k views

Find version of development library from command line?

I installed the c++ boost development libraries using Ubuntu software centre. The problem is that it was quite a long time ago and I cannot remember where they are installed nor what version they were....
mathematician1975's user avatar
13 votes
1 answer
31k views

How to add the ncurses.h to a C++ program compiled on gcc?

I am totally new to C++ programming on gcc. I wanted to add color to my text on the output on the console. Since there is no conio.h on linux, I researched and found that ncurses.h could do the trick. ...
prometheuspk's user avatar
12 votes
6 answers
100k 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 ...
Shamim Hafiz - MSFT's user avatar
12 votes
2 answers
8k views

Disabling C++11 in GCC 7.3

It seems like in Ubuntu 18.04, the default shipped g++ (version 7.3.0) runs in C++11 compatible mode by default. I am getting some errors in my old codes which are not C++11 compatible. I installed g++...
Soo's user avatar
  • 294
12 votes
1 answer
6k views

How can I write a dynamically updated panel app / indicator?

I am trying to write some panel apps for ubuntu Mate. I know C/C++, and SDL reasonably well. I have seen the Mate-University panel apps github page, but i cannot get it to work properly / Im having ...
j0h's user avatar
  • 14.9k
12 votes
1 answer
22k views

How to make Eclipse CDT's Linux GCC toolchain resolve C++ standard library headers?

In Ubuntu 12.04 LTS I installed the Eclipse CDT plugin and opened the new hello world project to just test everything out. When I was creating the project, I chose the only toolchain: "Linux GCC" ...
Muhammad Khan's user avatar
11 votes
2 answers
36k views

How to compile C/C++ program with GStreamer

I'm trying to compile this code: #include <stdio.h> #include <stdlib.h> #include <gst/gst.h> int main (int argc, char *argv[]) { const gchar *nano_str; guint major, ...
dwinar's user avatar
  • 113
11 votes
2 answers
579 views

Can unity places be written in C++?

Is C++ a supported language for writing unity places?
RolandiXor's user avatar
  • 51.2k
11 votes
3 answers
37k views

Installing latest version of wxwidgets

I am attempting to install the latest version of wxwidgets via the terminal and followed these directions. However, when I navigated to the folder /usr/include, a folder was created called wx-3.0-...
philm's user avatar
  • 707
11 votes
1 answer
3k views

False "application not responding" box is creating havoc with GDB

I'm trying to debug a C++ application using GDB and the Qt Creator IDE. Every time the debugger stops on a breakpoint, Ubuntu (v 17.10) thinks the application is frozen and issues the dialog box with ...
Carlton's user avatar
  • 301
10 votes
4 answers
32k views

C/C++ option not available in NetBeans

I upgraded Ubuntu 14.02 to Ubuntu 16.04 and realized that NetBeans was no longer working after the upgrade. So I installed netbeans again from the command line: sudo apt install netbeans But after ...
Mobi Zaman's user avatar
10 votes
4 answers
46k 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
10 votes
2 answers
75k views

How I know what version of clang I have installed?

How I know what version of clang I have installed ?
Eric Javier Hernandez Saura's user avatar
10 votes
3 answers
45k views

Eigen installation seemed to work, but I still can't make eigen work

I am trying to install eigen, but I don't seem to get it to work. I did: sudo apt-get install libeigen3-dev and everything seems fine, after dpkg -p libeigen3-dev I get: Package: libeigen3-dev ...
Akavall's user avatar
  • 647
10 votes
1 answer
7k views

Install latest cmake binary and accept licence automatically

I'm trying to install the latest binary version of cmake, on Ubuntu 16.04 LTS, automatically (via ansible). I have so far done: mkdir ~/tmp cd ~/tmp wget https://cmake.org/files/v3.10/cmake-3.10.0-...
Rekovni's user avatar
  • 223
10 votes
2 answers
29k views

G++ compilation error "cc1plus" not found

I think I accidentally deleted a couple files from my machine, and now G++ won't compile. I tried to apt-get remove it then apt-get install it to see if it would fix it, but it didn't work. Now I have ...
guest's user avatar
  • 101
10 votes
1 answer
12k views

clang doesn't find c++ stdlib on my ubuntu 18.04, but it does on a brand new install. What have I broken?

I've been building a github package for a while ... a new version comes out, and I build it. It uses clang6 which is default on my ubuntu, ubuntu 18.04 now, it fails to compile, it can't find a ...
Tim Richardson's user avatar
10 votes
2 answers
31k views

Update GCC to the 6.3 version [closed]

I want to use some C++ features only available in more recent versions of the language. The problem is Ubuntu 15.04 (Vivid Vervet) has 4.9.2 installed and looking at the output I get from apt-get ...
Fabrício Santana's user avatar
10 votes
3 answers
36k views

Cannot find boost-thread-mt library

I am compiling a program which requires boost-thread-mt library. I have installed libboost-all-dev using sudo apt-get install libboost-all-dev but compiler says that it cannot find boost-thread-mt ...
Muhammad Omer's user avatar
10 votes
1 answer
21k views

C++ fmt library installation is not working

I'm a new C++ user and I have been facing some problems to install external libraries in my programs. Currently, I'm trying to install the fmt library. I downloaded the repository content and unpack ...
Lucas's user avatar
  • 213
10 votes
2 answers
30k views

How can I know which version of the C++ "standard library" is installed?

I would like to install the C++ standard library documentation (following the answers in Download C++ reference) but I do not know which version of library is installed in my Ubuntu.
Alessandro Jacopson's user avatar
10 votes
2 answers
3k views

Unity Launcher API for C++

I am trying to develop some program in QT with QT SDK. Yesterday I was reading about Unity Launcher API on official ubuntu website. But there is example only for Vala and python. Is possible to use ...
kv1dr's user avatar
  • 1,381
10 votes
2 answers
2k views

apt-get install <package> equivalent using C++ apt-pkg library

I am building a small QT (C++) application where I ask user the software he want to install. Once he selected some packages a, b, c from the list all I have to do is run sudo apt-get install a b c ...
mac's user avatar
  • 3,911
10 votes
1 answer
616 views

Howto create a new C++ based Ubuntu touch project in Ubuntu SDK?

There is no option to start a C++ and QML based project in Ubuntu SDK. It only offers to create a QML project with no C++ codes. If I try to add C++ classes to the QML project, I get this error: ...
user1714647's user avatar
9 votes
1 answer
55k views

How to install Point Cloud Library v1.8 (pcl-1.8.0) on Ubuntu 16.04.2 [LTS] for C++? [closed]

I am trying to find a straight forward way to install C++ PCL v1.8 on Ubuntu 16.04.2 [LTS] UPDATE ----- After working through the various issues individually: This is a hybridisation of various ...
macourtney7's user avatar
  • 2,857
9 votes
1 answer
24k views

Exec format error of gcc-compiled Hello World c++

On AWS Ubuntu Server, I wrote C++ Hello, World program: #include <iostream> using namespace std; int main(){ cout<<"Hello, World!"<<endl; return 0; } And compiled ...
Daebarkee's user avatar
  • 193
9 votes
3 answers
18k views

Unmet dependencies libc++ [duplicate]

How should I correctly install clang's c++ library (with STL) on my lubuntu machine? I want to use clang and its c++ library because it offers better support for the upcoming c++14 standard. When ...
Victor Savu's user avatar
9 votes
2 answers
20k views

Once installed geos library (C++, and C), and then trying to install rgeos package (R), it reports geos-config missing!

Knowing that the package rgeos, from the R language, requieres a prior installation of geos libraries, I installed, both, libgeos and libgeos-c1 (3.2.2), using the synaptic installer in my Ubuntu 12....
JulioSergio's user avatar
9 votes
3 answers
4k views

Download C++ reference

I'm learning C++ and are currently for some weeks without consistently working Internet connection. I search a (ASCII) terminal searchable & readable C++ documentation. Today I e. g. searched for ...
Klau3's user avatar
  • 411
9 votes
2 answers
6k views

How to execute C++ program whenever a USB flash drive is inserted

I have a C++ program that accesses USB pen drives/flash drives. It works for currently inserted flash drive. A normal C++ program doesn't execute until we run it. But I wanted the program to run ...
vinayawsm's user avatar
  • 437
9 votes
2 answers
42k views

Installing MySQL Connector/C++

I would like to know which is the procedure to install the mysql c++ connector. After installing it to my Ubuntu OS will I have these extra c++ commands avaiable in every c++ IDE? For example, can I ...
Evaggelos Tsampazis's user avatar

1
2 3 4 5
16