Questions tagged [c++]

C++ is a general-purpose programming language.

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

Debugging a C++ program with Eclipse CDT crashes when Java Virtual Machine is instantiated with JNI

I am trying to develop and debug a C++ program using Eclipse CDT. The program uses java Native Interface (JNI). When JNI_CreateJavaVM() is called, the program crashes. If the program is run through ...
0
votes
1answer
69 views

Java JNI call FindClass fails from a C++ program

I am trying to follow this tutorial which calls a Java class from a C++ program. A Java virtual machine is instantiated but the call to FindClass fails. The code sample is directly from the tutorial: ...
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/...
0
votes
1answer
23 views

Is it possible to run a c++ code and send the output to a python code in a bash file? [closed]

I have a C++ code that uses NVIDIA DRIVEWORKS (CUDA) and extracts some images. I have a Python code that takes the extracted images and do processing. My question is that is it possible to run two ...
-1
votes
0answers
24 views

install g++ std=2a [duplicate]

Hi all I need to used c++2a for an assignment on 18.04. How do I install it? Are there any dangers of it breaking Ubuntu? If so is there a simple way to avoid these dangers. Additionally what is ...
0
votes
0answers
26 views

MySQL/C++ connector configuration, missing endian.h and byteorder.h

I am trying to configure the MySQL/C++ connector on a Ubuntu 18.04 server (with cmake 3.10.2, g++ 7.5.0, OpenSSL 1.1.1) following these instructions: https://dev.mysql.com/doc/connector-cpp/8.0/en/...
0
votes
1answer
3k views

eclipse-CDT won't debug my c++ programs

I've installed eclipse from ubuntu repositories and I installed CDT from "install new software." But every time I try to debug a simple program, an error occurs that says 'launching q.cpp debug' ...
0
votes
1answer
1k views

CMake Warning at /usr/lib/x86_64-linux-gnu/cmake/Qt5Core/Qt5CoreMacros.cmake:273 (find_package):

Compile C++ program with Qt 5.7.0+cmake, error appeared: C Make Warning at /usr/lib/x86_64-linux-gnu/cmake/Qt5Core/Qt5CoreMacros.cmake:273 (find_package): Could not find a package configuration ...
3
votes
2answers
2k views

Error: ‘is_same’ is not a member of ‘std’ when build c++ project in ubuntu?

I have a small project and i get an error ‘is_same’ is not a member of ‘std’ when building. this is some code: template <class T> T* UcmExportFactory::Unwrap (T* ptr) { Utils::IUcmWrapper* ...
1
vote
1answer
4k views

Install g++-9 for c++20

I would like to run the full features of c++20 on g++. However, I need to install g++-9 for this purpose. Following the installation guides for old versions of g++ do not work for g++-9. Any hint? ...
9
votes
2answers
4k 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 ...
-1
votes
1answer
50 views

How to implement the curl --header in C++ (specifically for tdameritrade) [closed]

I recently started to write a C++ program to GET and POST data from/to tdameritrade through their api. I am new to cURL. tdameritrade has put up some guides for their apis. They do provide with simple ...
0
votes
1answer
3k views

CrossCompiling with libboost for ARM architecture

I am using a 32 Bit Ubuntu system and my goal is to compile my C++ program for arm architecture (beagleblack). However, my C++ program needs libboost meaning I get errors like this while compiling: /...
0
votes
1answer
62 views

C++ Colored output text when redirected in text file

The below code prints "Debug:" in color. printf("\033[1;36mDebug:\033[0m\n"); but when I redirect the to a text file the following is written in the out file: <0x1b>[1;36mDebug:[0m<0x1b>...
0
votes
0answers
31 views

How to install opencl on kubuntu 16?

I executed command below: apt-get -f install ocl-icd-libopencl1 But I get an error. Sorry, my language version is polish [ linux-image-generic-hwe-16.04 : Wymaga: linux-image-4.15.0-88-generic ale ...
0
votes
0answers
30 views

Reinstalling g++ and get bus error

Today I removed the g++ package with the commands: sudo apt remove g++ sudo apt purge g++ So, I reinstalled it with: sudo apt-get install g++ sudo apt install build-essential After the ...
1
vote
1answer
31 views

How to get response from Curl if post was successfull or not? [closed]

i am using curl in c++ problem is that i am able to get error response if connection to server was not made due to wrong address or any other reason but i am not able to get response if data to the ...
2
votes
1answer
957 views

Qt5 - how to use Free? Asking for money

I need to use Qt5 till i release my final version, my client wont pay until he see the whole application is stable and not having any issue. But Qt5 is asking money before even i get a client. In ...
1
vote
1answer
242 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 ...
0
votes
2answers
5k views

How to compile a c++ program from notepad++? [closed]

I am running notepad++ through wine. But I am not able to compile a program(specially c++). Is there any compiler that I could use? What should I do?
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 (...
0
votes
1answer
107 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 ...
1
vote
1answer
89 views

b2 doesn't recognize zlib

I have a hard time compiling some program. error: undefined reference to 'boost::iostreams::zlib::best_speed So I am trying to build boost 1.72.0 on Ubuntu 19.10 $ ./b2 Building the Boost C++ ...
8
votes
6answers
67k views

First Time To Run C++ Program on Ubuntu 14.04

What is the command to run the following simple C++ program? #include <iostream> using namespace std; // main () is where program execution begins int main() { cout << "Hello World"; ...
3
votes
3answers
4k views

Simple C++ Thread Program Can't Be Compiled

The following is my 1st multi-threaded program. But while it was compiled, there is a linking error. The part of the error message: std::thread::thread<void (&)(int), int&>(void (&...
0
votes
1answer
4k views

CodeBlock c++ problem: Procces returned 126 (0x7E)

I'm having a problem with CodeBlocks. I can't run any C++ code and every time i try, I get the following error in terminal Process returned 126 (0x7E)` I googled it and found this link: http://...
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 ...
0
votes
0answers
183 views

How to downgrade gcc, g++, and gfortran?

I'm trying to install the package mice in Rstudio but the installation fails and shows the error /usr/bin/ld: cannot find -lgfortran. I note that there is no directory called /usr/bin/ld in my PC, but ...
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....
5
votes
1answer
337 views

C++ fmt library instalation 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 ...
2
votes
2answers
637 views

Installing latest cmake on Ubuntu 18.04.3 LTS run via WSL: OpenSSL error

Using CLion on Windows (a C++ IDE), I'd like to install the latest version of cmake on Ubuntu 18.04.3 LTS run via WSL (the current version of CLion requires cmake > 3.15, while I have only version 3....
1
vote
1answer
3k views

How to create a installer package of my software made in Code Blocks

I am an amateur developer, I'm using Ubuntu for like 1 month or so and I want to know how can I create an installer package form my Code Blocks C++ generated release file..
1
vote
3answers
3k views

Eclipse is not working in Ubuntu 16.10

I updated from Ubuntu 16.04 to 16.10. Eclipse used to work fine in Ubuntu 16.04 but now it is not. The Eclipse for Java (Neon) asks the workspace and after clicking OK the error appears: An error has ...
0
votes
0answers
81 views

How to compile and run c++ program from Kate editor using build tool?

I'm trying to compile and run a c++ program from Kate editor with the following build command. konsole -e g++ -std=c++14 -Wall -c %f -o %n.o && chmod +x %n.o && ./%n.o But it gives ...
0
votes
1answer
153 views

c++ compilng failed

I have tried to build and run c++ files but it failes every time I try. here is the code when I compile it in the terminal In file included from /usr/local/include/c++/8.3.0/x86_64-cros-linux-gnu/...
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 ...
29
votes
2answers
16k 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 ...
4
votes
2answers
6k views

How to install Eclipse C/C++ in Ubuntu 18.04

To clean install Eclipse for C/C++ on Ubuntu 18.04 I tried sudo apt install eclipse eclipse-cdt. It's showing an error, see the log file.... log file..... !SESSION Fri Aug 16 14:39:20 IST 2019 -------...
2
votes
2answers
3k 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 :)
0
votes
0answers
206 views

Netbeans error for C++: Build Host is not connected

I've installed NetBeans on Ubuntu 19.04 with this command sudo apt-get install netbeans Then, installed C++ plugins, restarted, create a simple hello world project from samples. Nothing is shown, ...
1
vote
3answers
2k views

Error while installing tiff-4.0.3

I get the following errors while installing tiff-4.0.3: pranav@pranav-Inspiron-1545:~$ cd dependency/ pranav@pranav-Inspiron-1545:~/dependency$ tar -xvf libtiff4-3.6.0-5.tar.bz2 usr/bin/cygtiff4.dll ...
0
votes
1answer
658 views

Is there any IDE like Visual Studio? [duplicate]

I was using Visual Studio for 2 years in Windows, but now I am using Ubuntu. Are there any other IDEs to use that are as high quality as Visual Studio? Please don't tell me the name of another IDE ...
29
votes
3answers
71k 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://...
0
votes
0answers
95 views

Brave browser build fails in Ubuntu 16.04

I am trying to build brave browser https://github.com/brave/brave-browser/wiki I successfully build it around 2 weeks ago. when I am trying to rebuild again it's giving me errors that I do not ...
0
votes
1answer
3k views

Install opencv eclipse

I am using ubuntu 13.10 and I am trying to install opencv on eclipse. I am following this tutorial LINK I do not know where is my library. This what I obtain when I try to find the files. ...
0
votes
0answers
106 views

Cross compile C++ application for ARM64 with openSSL libraries

I made an application in C++ for x86_64 and it works fine on Ubuntu. Now I want to run the same application on arm64 board running Ubuntu. For this I downloaded a cross-compilation tool chain from ...
1
vote
3answers
4k views

Choosing C++ debugger on linux

I recently changed from Windows where I was using Qt Creator to Ubuntu. The problem is that Qt Creator in Ubuntu can't properly debug due to some problem attaching ptrace to the program which was ...
0
votes
1answer
152 views

Can't install C++ library

I want to install the C++ library, but the terminal keeps asking me to insert the CD for installation. What CD? Here is the terminal code I used to attempt to install with: sudo apt-get install ...
0
votes
1answer
3k views

Install opencv4 in Ubuntu 16

Eventhough I tried different websites to install after performing installation to ensure the opencv version and library path, I compiled pkg-config... and pkg cflags... command, but console display as,...
0
votes
0answers
39 views

matrix multiplication of clbas_sgemm porting with arm compute library giving errors

examples/example_sgemm_1.c: In member function ‘virtual bool NESGEMMExample::do_setup(int, char**)’: examples/example_sgemm_1.c:104:66: error: no matching function for call to ‘arm_compute::NEGEMM::...

1
2 3 4 5
14