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

learn more… | top users | synonyms

1
vote
0answers
56 views

error while compiling my first program in C language? [on hold]

I am a newer user of Ubuntu I used to compile c file via Code Block in Win OS. But now I've created a simple program (hello ,world!). This is the code #include<stdio.h> /* demo.c: My first C ...
0
votes
1answer
25 views

how to change the Output Directory in a LINUX makefile so that a shared object can be relatively specified in C# DLLImport?

I would like to find out how to change the Output Directory in a LINUX makefile so that a shared object can be relatively specified in C# DLLImport? I read the following hint in ...
-1
votes
0answers
11 views

can not compile drivers for Nvidia jetson TK1

I have a hared time in installing wireless driver module for jetson TK1 nVidia, current kernal 3.10.40-gdacac96 error code from the terminal `make ARCH=arm CROSS_COMPILE= -C ...
3
votes
1answer
28 views

how to read variables in bash and pass these variables to a c++ program as arguments

I am trying to read a few vars in my bash script and pass these to a C++ program which will accept these variables as arguments. any help please? I got this far..but it does not work... echo -n ...
0
votes
0answers
29 views

Execute binary from C++ without shell [migrated]

Is there a way to execute a binary from my C++ program without a shell? Whenever I use system my command gets run via a shell.
0
votes
0answers
13 views

Writing serial data to /dev/dsp [migrated]

I am trying to write a c++ program to read serial data from an arduino micro controller and play it through my speaker. int main() { int ser_val; ifstream ...
0
votes
1answer
20 views

openSSL Key and Certificate

As far I know, in an authenticated SSL connection, both the client and server have private keys and provide their certificates (with the corresponding public keys) across the connection before ...
0
votes
1answer
23 views

Why is echo not working for mt valgrind command?

So I have my makefile working great, except that It doesn't create the valgrind.out file and I don't know why. So the console succesfully prints out that my executable file line is created but not ...
0
votes
0answers
8 views

How are attributes parsed in boost? Soap xml parsing? [migrated]

I am trying to decode one soap xml packet which is given below <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope> <SOAP-ENV:Header><cwmp:ID ...
0
votes
1answer
24 views

Execute a init script from C++ program

I have a script in my /etc/init.d/ which executes an application. I am able to start,stop and get status of the service from terminal. Now I would like to start the same service from my C++ program. ...
1
vote
2answers
46 views

How to replace GnuPG stable with GnuPG modern?

First I would like to state that I'm an absolute beginner in the Linux environment. For decades I only used Windows. Since a week or two I'm now using Debian for developing a C++ application with ...
2
votes
1answer
40 views

Compiler for 32-bit LSB MIPS MIPS32 architecture

I have a TV set top box that i'm currently experimenting on: I established a serial console connection to it through a serial port located on the board. I am trying to compile a simple C executable ...
1
vote
0answers
14 views

my gsm modem echo my command on mini2440

I have mini2440 and GSM modem that they connected to each other with USB serial port (ttyUSB0). this is my code in c++ to send AT: #include <QCoreApplication> #include <stdio.h> /* ...
1
vote
2answers
20 views

Is there a way to get directory part from variable in make?

I have makefile, where I define some lib and its path: MY_LIB= dir/lib Now I know that I can use @D to get directory part from target: #This will go to dir $(MY_LIB): cd $(@D) But I want to ...
0
votes
0answers
9 views

Reload all text of glade interface (Gtk::Builder) when change language in gtkmm

I use gtkmm, glade (Gtk::Builder) and gettext. When users select other language in the program, I have to restart the process to reload all interfaces. Is there any way to reload text of glade ...
0
votes
0answers
30 views

custom runtime environment - libpthread segmentation fault

I have built a project using gcc 4.9.2 (libstdc++.so.6.0.20). When I want to run that program on the virtual machine which is equipped with gcc 4.6.3 (libstdc++.so.6.0.16) I have to deliver ...
1
vote
2answers
36 views

How to create 32bit chroot system that is just a mirror of my current system for compiling purposes?

After lot of googling and posting and crying over obscure GCC linker error messages I concluded that the only way to reliably build something in foreign CPU architecture is to set up a chroot ...
1
vote
0answers
136 views

Error building and compiling GCC 5.2.0 from scratch on Vortex86DX

In order to upgrade a VortexDX86 custom linux with a gcc 3.2.3 compiler, I´m trying to built the GCC 5.2.0 compiler to support the latest C++ 11 standard. I have downloaded its source code from ...
0
votes
0answers
33 views

dlopen causes segfault when running in gdb

My project loads a libray (compiled in debug mode) dynamically within the main thread with dlopen and then uses dlsym without problem. However, when running in debug mode with gdb 7.7.1+dfsg-5, it ...
-1
votes
1answer
122 views

Forwarding return value of shell script to C/C++ [closed]

I tried to find possible solution on Google, but all I found is explanation on how to return value, but not how to accept it in some programming language, in my case C/C++? Does anybody have idea on ...
0
votes
0answers
27 views

how to covert character within each column as sub-column without duplication

I have a data.frame file like this: 1 200 444 444 2 310 NA 444 3 310 NA 444 4 NA 444 444 5 200 444 444 6 200 NA 444 7 310 444 444 8 310 876 444 9 310 876 444 10 NA 876 444 I want to convert ...
-1
votes
1answer
175 views

Communicating derived C++ types through a named pipe impossible? [closed]

I found that communicating a derived C++ type such as an opencv Mat or other derived types do go through the pipe if I send the derived type as a reference through a pipe: //Measurement FIFO ...
0
votes
1answer
34 views

CentOS and a small boost example

I ask this question here, because I think, it has more to do with linux than with boost itself. So i created a small cpp file: #include <boost/math/special_functions/round.hpp> #include ...
0
votes
0answers
62 views

Error building nodejs from source on Debian

I keep getting the same error when running make on nodejs source code. I've looked and some common problems seem to be lack of a c compilier or install g++. I have these and have double checked. Here ...
1
vote
3answers
497 views

Running a C++ compiled program in the background and sending input whenever needed

I have a compiled program written in C++ for a UNIX environment which has this kind of structure: int main(){ ... LoadEngine() ... while(1){ std::cin >> buffer; ... ...
0
votes
0answers
63 views

program “killed” as soon as it runs

Ubuntu 12.04 I have success with make, and output a program name algo. When I type ./algo,the terminal just directly shows 'killed' And I searched the var/log/message or syslog kern.log. I don't ...
1
vote
0answers
436 views

Work on a remote project with Eclipse via SSH and SVN+SSH (2 remote Linux)

I have the following boxes: a) A Windows box with Eclipse CDT(or PTP) b) A Linux box,including Compiler, accessible for me only via SSH. c) A Linux box, including SVN Source, accessible for me only ...
-2
votes
2answers
263 views

Pipe Named Fifo [closed]

I am implementing a named pipe to write and read data between two processes in cpp. The first process acquires a feature point from an image in real time while the second reads this feature point. It ...
0
votes
0answers
43 views

Weird G++/AR Compilation issue

I'm working a patch-set to compile dpkg and APT onto Cygwin. I've almost got everything working, but I'm encountering some weird behavior with ar/g++ that I can't explain. APT's stock Makefile uses ...
0
votes
0answers
613 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
55 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 ...
2
votes
0answers
48 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 ...
3
votes
0answers
139 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
61 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
54 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
95 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
354 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
133 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
72 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
75 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
153 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
312 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
23 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
221 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") ...
1
vote
3answers
237 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
114 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
98 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
51 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
246 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
109 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 ...