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

learn more… | top users | synonyms

2
votes
1answer
27 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
48 views

Windows to Linux migration [on hold]

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
18 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 ...
2
votes
2answers
179 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
19 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
65 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
44 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
76 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
43 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
48 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
30 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
75 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
70 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
10 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
38 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
98 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
0answers
24 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
81 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
38 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
43 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
119 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
69 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
94 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
69 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
2k 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
159 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
211 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
298 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
134 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
1k 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
273 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
329 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
37 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
227 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
983 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
12k 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 ...
0
votes
1answer
52 views

Compilation error on fedora 14

I installed fedora version 14 using virtual box but when I try to compile a program then displayed command not found. After that I tried to install g++ compiler using commands but, the way I followed ...
3
votes
1answer
802 views

How to detect global key presses

I have an Asus laptop that has a special key that can be configured to launch any software (at least on Windows). The general question is: how can I detect any key press (globally)? Then, how ...
2
votes
0answers
379 views

sudo apt-get install g++-4.8-multilib not working on Mint?

I've got the latest version of Linux Mint 16 (64 bit) and in Netbeans I am compiling a project in 32 bit mode. I get the error that I am missing bits/config.h. I think this is because I am in 32-bit ...
-2
votes
1answer
96 views

How to compile c, c++ and python code as “Released/Final” version? [closed]

I want to know if there are ways to compile C, C++ and Python code in order to not be able to reverse engineering it over Linux or not? I have heard there are some ways over Windows to do it, but I ...
2
votes
1answer
262 views

Auto indent C++11 lambda functions Vim

Is there any way to get Vim to auto indent C++11 lambda functions correctly? I have tried many different permutations of smartindent, cindent, etc. in .vimrc.
1
vote
2answers
78 views

Slight change to command to compile C++ program causes error

This morning , I was trying to compile a C++ program using the following command on the command line g++ -o foo.cpp foo I spend about an hour trying t to resolve why I kept getting undefined ...
2
votes
1answer
807 views

Running a process multiple times at the same time

I have a c++ program with opencv library which takes an image as input and perform pose estimation,color detection,phog. When I run this program from the command line it takes around 4-5sec to ...
1
vote
0answers
591 views

Debian init.d with a working C++ daemon, unexpected results

I am fairly new to programming for Linux, and init.d scripts, and I have a problem with my init.d script adapted from an example I found via a lot of google searching. Instead of getting a status, ...
0
votes
2answers
934 views

Is there a newer version of gcc in red hat?

I use Red Hat Enterprise in my school and I want to compile some c++11 code but the gcc --version is 4.4.7 which is not compatible. Is that one the latest version in the red hat repositories? is there ...
1
vote
0answers
98 views

Stanford's StanfordCPPLib on Linux

I'm using SUSE Linux 13.1 and self studying Stanford's CS 106B course. Here I have found the following zip file, cs106b-hw2-ngrams-starter-files.zip, and downloaded. Now questions This libs are for ...
3
votes
1answer
4k views

How to uninstall BOOST 1.49 and install BOOST 1.54 in ubuntu?

I have a boost 1.49 in my ubuntu system. And I am trying to uninstall boost 1.49 and completely remove it from my system. And after that install the Boost 1.54.0 I did like this to uninstall 1.49 ...
2
votes
0answers
206 views

Trouble embedding clang in a standalone application

I am running Ubuntu 13.04 on my end and I have installed clang as well as libclang-dev and llvm (through apt). I tried hard to run RecursiveASTVisitor example given here:- ...
0
votes
1answer
72 views

Squeeze/Lenny compilation : Library Link error

I've got a problem here : I have a C++ Library ("DataTsBroad") and a C++ Test app ("DataTsBroadTest"), to test it. Actually, the Lib and the Test app are both compiled an a Debian Lenny. Now, i ...