C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language.

learn more… | top users | synonyms

0
votes
0answers
28 views

error while loading shared libraries: libboost_thread.so.1.54.0: cannot open shared object file: No such file or directory

I am trying to connect MongoDb with Qt c++. When I build it there is no error, just information like; :-1: warning: libboost_system.so.1.54.0, needed by /usr/local/lib/libboost_thread.so, may ...
0
votes
0answers
18 views

Trouble with Boost due to missing Makefile.cmake file?

I'm not very familiar with cmake and am afraid if I make one small wrong error, things will really screw up. I have a previous project(PrevProject) that I got to compile successfully using ...
1
vote
0answers
56 views

Need help creating a loop [migrated]

My loop needs to be able to generate the letters A B C ext. verticaly like this: A B C Yet when it reaches letter J it needs to start over. The user inputs how many lines to generate through the ...
-1
votes
0answers
24 views

Problems with creating lotto ticket [migrated]

I have to create a program that looks like the printout of a lotto ticket. Yet I can't seem to get the "mega" number in the right place. We have to generate 5 random numbers between 1 and 56, then one ...
0
votes
0answers
21 views

I keep getting a space in my program from cin.get() [migrated]

This is my program: #include <iostream> #include <cstdlib> #include <ctime> using namespace std; #define RAND(a,b) (a + rand()% (b-a+1)) int main() { int num; int ...
2
votes
0answers
34 views

Which process wrote to which memory address? [closed]

Recently, I've been seeing a wide variety of memory-related crashes at work (C++ applications on Ubuntu 14.04). Our applications use a properietary third party library to interface with real time data ...
0
votes
0answers
15 views

Adding reversed numbers [migrated]

I have written c++ code to add multiplicative inverses and the output should again be the multiplicative inverse of the added number. Can you find any errors in my code. I tried to upload it to ...
3
votes
0answers
33 views

Cannot use keyboard within Qt app without sudo

I have an embedded Qt application crosscompiled that runs on BeagleBone Black. It works Ok, but one thing- It doesnt accept keyboard input if i wont run in directly on BeagleBone Black preceeding with ...
0
votes
1answer
35 views

Build log4cxx [DEBIAN]

Please help me from where to start when building log4cxx package, do I need some other packages for bulding this? I can't find anything significant to help me to solve this problem. I tried with ...
2
votes
2answers
39 views

Releasing linux software - compatibility

I want to release a C++ library for Linux. Is it true that (when no other libs are dynamically linked) only the glibc version decides compatibility to other Linux distributions? Is there a better way ...
0
votes
1answer
32 views

gdb displays not all variables in KDevelop [closed]

Hoping, the image describes the issue much better than I can do. Generally, I'm debugging a multithreaded application in KDevelop with gdb. I'm debugging the app step by step (F11 shortcut) and have ...
1
vote
1answer
91 views

Using MPI with a .sh script?

I am a beginner with Unix and MPI. I have a runPR.sh script as below DIR=/directory/buildagain/bin/Project FILELIST=$1 while read FILE do echo "Processing ${FILE}..." ./makeInp.sh ...
3
votes
1answer
61 views

Io redirection vs file logging performance c/c++

Is there a performance difference from a latency point of view if we do a regular printf and redirect stdout to a file when running the program ( e.g., ./a.out > log.txt 2>&1 ) vs using fprintf ...
2
votes
1answer
48 views

External command to force ofstream to flush

I have a C++ ofstream that, for performance reasons, I don't flush from inside the code. However, occasionally I need to inspect the file contents. Is there a Linux command that will force the ...
0
votes
3answers
69 views

Windows to Linux migration [closed]

I have been working with windows application development in C++ and SQL for around 3 years. I want to learn to develop C++ application on Linux and get myself little comfortable with Linux operating ...
0
votes
0answers
78 views

Cgroups usage in Ubuntu and Centos using libcgroup C++ API

I am trying to create a C++ application that limits resources for the current process based on some configuration specified by user using the libcgroup API ...
3
votes
2answers
219 views

The «sh» being launched with execl() becomes a zombie

I am spent whole half a day, but still couldn't figure, why is the dash being launched with execl call just becomes a zombie. Below is a minimal test case — I'm just fork a child, make a duplicate of ...
0
votes
0answers
20 views

How to obtain block device label [duplicate]

I have a tricky problem. I have a block device connected to SLES11, it is present in /proc/partitions but it is not mounted (not present in /proc/mounts). From C code I want to find the block device ...
0
votes
0answers
129 views

(Linux Mint) Wine, Wine64, Wineboot, etc. result in “Auto-start service L”StarOpen“ failed to start: 2”

I wrote a simple program that prints the detected OS and bit depth, then compiled it with wineg++. If I run that program ("./wineversion.exe", "wine ./wineversion.exe", or "wine64 ./wineversion.exe") ...
0
votes
0answers
82 views

Getting started with D-Bus using C++ and systemd

I'm trying to get up & running with systemd dbus on my Linux desktop machine. What is a good place to start ? Is there an exhaustive documentation of systemd dbus API ? My first goal is to enable ...
1
vote
3answers
134 views

loop test strings to see if input is valid for C program input

For example I have a file filled with some pretty gnarly strings. 12345678900 1111111111111111111111111 ...
0
votes
1answer
58 views

What else is needed to use clang besides “apt-get install clang; clang hw.cpp”?

Installed clang: $~/Projects/clang$ sudo apt-get install clang Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be ...
2
votes
0answers
73 views

Show connected printers in CUPS

Is there a way to list the available/connected printers in CUPS using the command line or better yet using the CUPS API ? I already tried lpstat -a but it only lists the installed printers and not ...
0
votes
1answer
45 views

GCC warning when compiling Orange

When I try to install Orange (http://orange.biolab.si/download/) on ubuntu, I get these messages: gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC \ ...
0
votes
4answers
125 views

Load a service in Linux programatically [closed]

Given a service name(created by user) and its path, how can I load and start the service at runtime from a C++ program in Ubuntu. Does there exists functions similar to the Windows functions such as ...
-4
votes
1answer
83 views

Would my programs run on freeBSD?

I tested freeBSD in a virtual machine on my Linux pc, and I kinda like it. I noticed that the file structure is similar to that of Linux, and many Linux commands will also work on freeBSD. My question ...
0
votes
0answers
11 views

0 Active connection while Downloading Blockchain?

I am not able to connect to download blockchain in logoscoin. It shows O active connection, I am also attach debug logs below: 2015-01-24 06:18:15 Logos version v0.8.6.4-ga5aedeb-beta (2015-01-22 ...
0
votes
0answers
60 views

assertion Failed error while running Bitcoin-Qt application?

I have downloaded Bitcoin-qt project from GitHub for Ubuntu 14.04, But I don't know why I'm getting error: Error: /main.cpp:2985: bool InitBlockIndex(): Assertion `block.hashMerkleRoot == ...
1
vote
3answers
140 views

Status of network ports

I hope it is possible to get the necessary details of each network port from /etc/services. If I have to develop a C++ program to get the status of each port how should I start it? I am not allowed ...
0
votes
1answer
50 views

how to define the top dir in automake system?

I usually use a typical steps to generate the makefile, and firstly I use the "build.sh init" to generate the configure file, and then I use "configure" to generate the makefile with makefile.am file. ...
0
votes
1answer
118 views

Debugging with shell programming and cpp files?

I am having trouble understanding how my code is working. I am new to this project and never learned unix before. My coworker quickly showed me how to run the program but didn't explain how it worked ...
0
votes
1answer
58 views

How to edit Qt4 source and make changes apply

Sorry for noobish question, I have never done this before. Basically, I have a change to be done in /usr/src/qt/src/src/gui/kernel/qclipboard_x11.cpp There is a 10s timeout that causes apps to ...
1
vote
1answer
71 views

Common library for all linux distributions

I want to develop a C++ library that can be used on multiple Linux distributions like RHEL, Suse, Ubuntu etc... If I compile my source code into a .so (shared library) on one Linux environment(say ...
1
vote
1answer
214 views

open() return new file descriptor posix [closed]

I have to set the return values for open() in posix. How do I return "the new file descriptor" as it is said in the Linux man pages: RETURN VALUE open(), openat(), and creat() return the new ...
0
votes
1answer
133 views

How to solve these issues installing OIS?

I am trying to install OIS on Ubuntu 13.10 because I am trying to install orgre because I am trying to install FreeOrion. Anyway, here is the page I am following: link which fails in step 1.1 at the ...
2
votes
1answer
103 views

How to compile manual files .1

I have .c, .h, and .1 files, how can I compile them together in one executable file. Everything clear with .c and .h files, but I have also .1 as I can see from the content it is used for manual, how ...
2
votes
1answer
77 views

On linux, how to get “incompatible” i386 f77 libraries to work with current Fortran compilers, like gfortran?

I would like to run the elf32-i386 library libkernlib.a with a Fortran 77 program on my latest Ubuntu linux machine. From what I've read, gfortran is backwards compatible with Fortran 77, but I'm ...
5
votes
3answers
3k views

System(“pause”) in Unix?

I normally use a debugger such as cgdb so I thankfully hadn't needed to resort to system calls for debugging, until now. I have a binary that takes around 30 minutes to load in gdb and frequently ...
0
votes
1answer
225 views

Haskell, C++, AWK, Bash, Lisp … Which one is faster? [closed]

I was wondering, which of these programming languages are faster at handling big data files of only strings: Haskell, C++(Boost), AWK, Bash, Lisp... So far I have found the paper Haskell vs. Ada ...
0
votes
0answers
263 views

Unable to create gui in Qt creator

Till now I was creating GUI on windows using c++ on visual studio, now I decided to move on linux. So I install Qt creator from here . Now I follow a video tutorial for creating gui application with ...
0
votes
0answers
390 views

Debian wheezy C++11 source package

I'm currently learning debian packaging and I am making a source package for a C++11-based software. Debian wheezy does not have a 4.8+ g++ package, so how could I make a source package on this ...
4
votes
1answer
159 views

How to compile programs on Linux systems when I don't have sudo privileges to install the dev dependencies [duplicate]

How should I go about compiling programs that depend on libraries whose development packages (headers and such) aren't pre-installed on the system when I don't have sudo access? In this particular ...
3
votes
1answer
2k views

VIM as c++ IDE - autocomplete

I'm still learning C++, but I know already some stuff. I used to use Visual Studio, but after I switched to Debian, I was working with Code Blocks. Recently I heard about using VIM as IDE and started ...
0
votes
4answers
314 views

Compiling C/C++ code by way of including preprocessor build instructions in an actual C/C++ source file

So here's the thing, and it's really just conceptual so don't let it bug you: I've got reasons for not wanting to rely on a specific build system. I don't mean to dis anybody's favorite, but I really ...
2
votes
2answers
381 views

how to add curlcpp to the library/include path?

I'm using Arch Linux and have successfully built https://github.com/JosephP91/curlcpp However, I have no idea how to build the example program. I keep getting fatal error: curl_easy.h: No such file ...
3
votes
1answer
46 views

How to configure my enviorment in such a way that a proper (different from the system one) version of library is used

I guess that this question is a borderline between ServerFault and StackOverflow and this site. But I think that U&L is most relevant. I have some C++ code that depends on a library in version X ...
2
votes
2answers
277 views

What is the best tool for automating the building 32-64bit libraries for Unix & Windows building C++ software, replicable by users and machines?

Is there a system or product that can be used in automating the process of building 32bit and 64bit libraries for multiple platforms (Solaris (Sparc & x86), and windows) used in building C++ based ...
1
vote
3answers
2k views

libstdc++.so.6: open failed: No such file or directory

I'm trying to run my first C++ program on Solaris. Just a simple Hello World program. When I try to run. I get the error libstdc++.so.6:open failed:No such file or directory. Of course I did some ...
2
votes
1answer
1k views

Finding dependencies for a compiled C++ program

I wrote and compiled a C++ program using Qt Creator in Ubuntu 13.10 (32 bit). I tried to run the compiled program in a newly installed Ubuntu 13.10 (64 bit). But it is not run. I think the problem is ...
0
votes
2answers
15k views

conio.h file missing error [closed]

I want to execute a .cpp file while contains the #include <conio.h> header file, but while executing I'm getting the following error: "program.cpp:4:20: fatal error: conio.h: No such file or ...