Questions tagged [c++]

C++ is a general-purpose programming language.

182 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
12
votes
1answer
2k 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 ...
5
votes
1answer
16k 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....
4
votes
0answers
292 views

Assembly Language on Ubuntu

So I was currently studying about assembly language and I came across this awesome command on terminal, gcc -S filename.cpp, that produces the assembly code of a C++ source file. But after I ...
4
votes
0answers
3k views

Boost 1.58 installed, but boost_thread and boost_locale missing

Trying to build a project that requires boost. I get the following error: Unable to find the requested Boost libraries. Boost version: 1.58.0 Boost include path: /usr/include Could not find ...
3
votes
0answers
417 views

Ubuntu Xenial: perf doesn't demangle C++ symbols

Linux perf-tools don't seem to work as expected on Ubuntu (16.04). C++ symbols don't get unmangled, I only see garbled stuff like "_afki34334ldfjkdasf_dfkj". Note that I have compiled the program and ...
3
votes
1answer
6k 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 ...
3
votes
0answers
9k views

Prefix and Path for Cross GCC in Eclipse

I'm pretty new in ubuntu and have a problem with it. I wanna to write a c++ program in eclipse and compile it with cross gcc. At the first i Added "CDT" from "help-->install new software" Now when ...
3
votes
1answer
386 views

Can't get iconify() and deiconify() to work properly

I'm writing app for Ubuntu with C++ and Gtkmm. In my app i use libappindicator to show icon with simple menu in notification area. Icon and menu works ok, i can minimize window to panel (using iconify(...
2
votes
0answers
159 views

How should I run this ordinary example from DLIB-C++?

I am too new in DLIB-C++ and I decided to run the following example on my Ubuntu 16.04. However, I receive the following errors. What is the solution? And what if I want to run all the examples of C++ ...
2
votes
0answers
2k views

How to build the Boost Python for both Python2 and Python3?

I was trying to build the Boost 1.65.1 for both versions of Python I use: ./bootstrap.sh --with-python=python2 --with-python=python3 However, the first instance of the --with-python option has been ...
2
votes
1answer
757 views

Issue with gcc/g++ while cmake building (./bootstrap)

I decided to reinstall cmake but after removing it I am having an Issues with installing. After entering a ./bootstrap It prints I am using type of g++ which I dont know how I got it CMake 3.12.0, ...
2
votes
0answers
961 views

Unable to find STL headers in Ubuntu 18.04

I am running the following command, with the verbose output below it: $ clang++ -m32 -I ../include -o format.cc.o -c format.cc -v clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final) Target: i386-pc-...
2
votes
0answers
95 views

Help Diagnosing Problem in Developing Custom OpenOffice 4.1 App using C++ Ubuntu 14.04.01 LTS server

I seek help with the "generic" part of our C++ spreadsheet server app which connects to a headless Open Office 4.1.2 service. The "generic" connection part of this application is represented in the ...
2
votes
0answers
718 views

Development environment similar to virtualenv for C++

I am looking for a tool that lets me switch between different versions of the packages/builds I use for development purpose something similar to virtualenv for python. I am using install prefix at the ...
2
votes
2answers
4k 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 (...
2
votes
2answers
1k views

QML app with C++ plugin (cmake) adding resource file

How to add qrc file to "QML app with C++ plugin (cmake)" project ? I can't find a working instruction. I found only one thing, add this to CMakeLists.txt: qt5_add_resources(RESOURCES modules/...
2
votes
1answer
350 views

Ubuntu Touch App with Simple UI (QMake) - how to connect C++ to QML

I've noticed that the Ubuntu SDK now has a template for an 'App with Simple UI (QMake)'. This creates a C++ Ubuntu application project with a sample UI containing a Label and a Button (Needs a 15.04 ...
2
votes
0answers
765 views

lock/unlock events for in C++ app which should not depend on screen savers

We have a product, which was developed for Windows. Because of customer request we are developing it for Linux also. So being a beginner to Linux, have migrated most of it (which I loved it). Now got ...
2
votes
0answers
301 views

Modifying default KawigiEdit C++ template in Ubuntu 12.10 LTS

I am trying to edit default c++ template of KawigiEdit plugin, but after I configure and save the modified template as default template, there is no effect. Has anyone modified KawigiEdit's default ...
2
votes
1answer
1k views

Get keyboard input without requiring root and without x11

I'm trying to capture keyboard input in a C/C++ program without requiring root privileges and without the use of X11 XNextEvent(). I've tried to open the device directly, but for obvious security ...
2
votes
0answers
101 views

Publish a QML/C++ application as a click package

I've written an application which I would like to publish as click package. All the guides and prepared projects mention plain QML applications only. My application furthermore depends on a shared ...
2
votes
0answers
2k views

Problems installing gcc for cross compiling for ARM

I've been trying to install the gcc-arm-linux-fnueabi package, and I've done it a few times by a few different methods but I always seem to be missing the c++ folder in the includes directory. To ...
2
votes
1answer
2k views

A question about “add-apt-repository”(gcc 4.7 or bumblebee)

I installed Ubuntu 12.04 in my notebook and I use C++. I want to use C++11, so I want to upgrade my gcc to gcc-4.7. I ran these commands: sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo ...
2
votes
1answer
94 views

Problems with installing C++ version > 4.7

I am currently using Ubuntu 12.04.5 I want to install the latest version of C++. I used the following commands to install. sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update ...
1
vote
0answers
30 views

g++ cannot find main function for simple “hello world” program

I have been trying to compile a simple hello world program in C++ on my lubuntu laptop. I use the command g++ -o out cta.cpp but I always get the error message below.. /usr/bin/ld: /usr/lib/gcc/...
1
vote
1answer
188 views

how can i use kbhit() function while using gcc compiler,as it does not contains conio.h file?

GCC compiler does not contains file but i have to use kbhit() function to make a program, what can i do ? is there any substitution of it?
1
vote
0answers
37 views

What make my file become read only when I use open()

We created one applications using below source code(C++): int_t fd = open( "test.conf",O_RDWR | O_CREAT | O_TRUNC, S_IRUSR ); From the beginning, test.conf was OK, it is a read-write file. One day, ...
1
vote
0answers
93 views

Installed c++ libraries and header removed from search paths

I recently upgraded to Ubuntu 19.04. However, somehow I messed something up today and I don't know how to fix it. If I want to build a c++ program, all headers that are located in a subfolder inside ...
1
vote
0answers
65 views

../x86_64-linux-gnu/libarmadillo.so: referencia a `H5Ovisit1' sin definir collect2: error: ld returned 1 exit status

I cannot compile anymore a cpp file with armadillo library. I get this: /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libarmadillo.so: referencia a `H5Ovisit1' sin definir collect2: error:...
1
vote
1answer
74 views

Snapcraft - configure - permission denied

I'm building a snap but when I build the package, snapcraft tell me : Failed to run './configure --prefix=' for 'synchrorep': Exited with code 126. When I launch ./configure on my local, all is fine....
1
vote
1answer
244 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 ...
1
vote
0answers
25 views

Command line: program freezes, starts again with user input

I am running a c++ programm on ubuntu, which periodically executes python scripts for long time measurement purposes. My programm takes a photo every 10 seconds and then evaluates the data. But after ...
1
vote
0answers
52 views

Tracking down ODROID-xu3 alignment traps

I'm using an Odroid XU3 with: Ubuntu 18.04 (kernel version 3.10.106-154) Clang 6.0.0 (reports /usr/bin/../lib/gcc/arm-linux-gnueabihf/7 as the gcc installation) architecture is armv7l according to ...
1
vote
0answers
582 views

Processing triggers for libc-bin (2.28-0ubuntu1) … /sbin/ldconfig.real: /usr/lib/libgraph.so.1 is not a symbolic link

Can someone help me with this problem i have been facing this problem since i have installed libgraph-1.0.2 in my Ubuntu 18.10. Actually i was trying to use graphics.h library in my program so while ...
1
vote
0answers
255 views

Including SOIL library with find_package

I have been porting my old OpenGL application to Ubuntu and stumbled across this problem. I can't figure out how to properly import SOIL library. I use CMake and I'd like to use the standard ...
1
vote
0answers
70 views

Getting “double precision not supported on this device” error when trying to run a program using OpenCL in ubuntu 18.04

I am trying to run a C++ program on my laptop with ubuntu 18.04, it compiles but I get an error when I try to run it in the terminal. The program uses OpenCL because I am trying to learn how to use ...
1
vote
0answers
561 views

CLion CMake: arm-none-eabi-g++: error trying to exec 'cc1plus': execvp: No such file or directory

I've been struggling with this for ~2 days now and I can't seem to find the solution. I recently switched to a new laptop and installed Ubuntu 19.04, and now something with my c++ compiler is not ...
1
vote
0answers
302 views

dpkg: error processing package cpp (--configure)

Out of a sudden I receive this error on every apt install or apt upgrade. Using Ubuntu 18.04 dpkg: dependency problems prevent configuration of gcc: gcc depends on cpp (>= 4:7.3.0-3ubuntu2.1); ...
1
vote
1answer
356 views

I can't `make` OpenCV 3.1 (Ubuntu 18.04)

I'm trying to make OpenCV 3.1 after I generate the build with cmake-gui. I get this error [ 16%] Generating precomp.hpp.gch/opencv_core_Release.gch In file included from /usr/include/c++/7/bits/...
1
vote
1answer
1k views

OpenGL 3.2 on 18.04 VirtualBox guest: Is it possible?

I'm in a Computer Science course that has assignments to be done in C/C++ using OpenGL 3.2 and GLSL 1.5.0. There was a pre-made assignment which compiled and ran fine on the CS department's Ubuntu ...
1
vote
1answer
417 views

/extractor/backoff_sampler.cc:24:18: error: ‘round’ was not declared in this scope

I am trying to build cdec on Ubuntu 18.04.1 LTS (running in VirtualBox on Windows 10). Please note that I am not at all an experienced Linux power-user. I executed the commands given in the ...
1
vote
0answers
161 views

Beaglebone Black: GPIO pin export and unexport

I am diving into Linux on BBB, following this page. Can someone explain to me what export and unexport do, and why they are needed? Can't you just write straight into the virtual file system with ...
1
vote
0answers
72 views

Installation of CliPP on Ubuntu 18.04

I am working on a C++ project and I want to include a JavaScript function (call JavaScript functions from C++) in my CLion project. I found the CliPP library that can do that, but the installation ...
1
vote
0answers
590 views

Problem with boost 'undefined reference to'

I'm trying to set up this program (vocus2) I have install both boost and opencv after cmake . i get a confirmation -- Boost version: 1.46.1 -- Found the following Boost libraries: -- ...
1
vote
1answer
708 views

ROOT-installing with cmake succeds but is not usable

I currently am working with Ubuntu 16.04.3 LTS. You should know that I am completly knew to any Linux environments, so please excuse my lack of details if there's any. I have to work with the library ...
1
vote
0answers
481 views

How to startX as non-root user inside the rc.local?

I am trying to start startx as non-root user in my Ubuntu-server 16.04(Linux nanopim1 3.4.113-sun8i #16 SMP PREEMPT Tue Jun 13 14:15:57 CEST 2017 armv7l armv7l armv7l GNU/Linux) with openbox installed ...
1
vote
0answers
741 views

How to install and use cpptest unit testing framework for c++

I have installed cpptest on linux (Ubuntu 16.04),Step to install. $ cd cpptest-1.1.2/ $ ./configure $ make $ sudo make install. Installation dumped some .so and .a file in user/local/lib now I ...
1
vote
0answers
661 views

Dlib 19.4 will not build with cmake on ubuntu 16.04

This is the error I get while building: cmake --build . --config Release [ 23%] Built target dlib [ 23%] Linking CXX executable sqlite_ex CMakeFiles/sqlite_ex.dir/sqlite_ex.cpp.o: In function `std::...
1
vote
0answers
2k views

cmake error while using boost on Ubuntu 16.04

$ cmake --version cmake version 3.5.1 CMake suite maintained and supported by Kitware (kitware.com/cmake). $ uname -a Linux ubuntu-micslogs 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC ...
1
vote
0answers
225 views

Getting camera buffer using Qt with c++ and QML

I am new in Ubuntu touch apps development. my question is : is there a method to get a buffer or images from phone camera using C++. after that, i must process these images pixel per pixel and past ...