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

learn more… | top users | synonyms

9
votes
1answer
3k views

While there is C++ why most of Linux programs are written in C?

Why most of linux programs are written in C? Why they are not written with C++ which is newer than C?
8
votes
1answer
7k views

Difference between Cross GCC and Linux GCC toolchain

While creating new C++ Project in Eclipse, I am being asked about toolchain. What is the practical difference between these toolchains - Cross GCC and Linux GCC. In what circumstances use them? Does ...
6
votes
1answer
316 views

Why would one want to compile multiple .cpp files to the same executable?

Why would you do g++ -Wall -I/usr/local/include/thrift *.cpp -lthrift -o something instead of: g++ -Wall -I/usr/local/include/thrift -c Something.cpp -o something.o g++ -Wall ...
5
votes
3answers
4k views

Most common encoding for strings in C++ in Linux (and Unix?)

For creating a C++ program that is source code level portable between Windows and Linux and handles internationalization well, there are IMHO three main encodings to consider: The encoding of the ...
4
votes
3answers
722 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 ...
4
votes
1answer
88 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 ...
4
votes
2answers
732 views

c++ programming on a Real-time linux OS

Is there any gotcha's programming RealTime C++ applications (user space and linux drivers) on RT linux kernel compare to a std linux kernel? The Linux RT patch applies changes to kernel scheduler, ...
4
votes
2answers
339 views

Is it possible to send arrays from bash to C++ program?

I wanted to know, if its possible to create an array_of_strings and send it to a C++ program, which has an argument string array_of_strings[]?
4
votes
1answer
2k views

Why is my C++ program killed by OS

I've compiled small C++ application for school project on my virtual ubuntu 11.04. However when I attempt to run it over some larger data set after ~20 sec the program is killed by OS. Killed ...
4
votes
2answers
914 views

list header files used by a project compiled with gcc along with hierarchy

I currently have a C++ project that spans two different source control systems. Without checking in the full complete source code from the first system into the second system I plan to check in just ...
3
votes
2answers
346 views

What does this Linux command do?

g++ -Wall -I/usr/local/include/thrift *.cpp -lthrift -o something I am new to Linux and am trying to learn "as I go along"....This is from the Apache Thrift website. Also is the -I/usr supposed to ...
3
votes
2answers
17k views

How to install g++ 4.7.2 & c++11 on CentOS 5.x?

I'm trying to install the latest stable g++ and c++11. My host did it through yum install and thought that it was the latest, but it's not, and they are now saying that this is beyond their level of ...
3
votes
1answer
686 views

libstdc++.so.3 => not found on CloudLinux, no SuperUser permissions, seemingly in chroot.

I am trying to install the Linux x64 BOINC command-line interface client on a CloudLinux machine with x86_64 Architecture. When I try to run the executable I get an error: ./boinc: error while ...
3
votes
1answer
30 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 ...
3
votes
1answer
337 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 ...
2
votes
2answers
2k views

How to use STL in unix and linux?

How to use STL(standard template library) in HP-Unix . How to compile and run the program with STL functions?
2
votes
3answers
421 views

Developing software on linux

What tools or IDEs do I need to start developing software on Linux in C++? Can I work using C#? What are necessary skills in order to know to develop software on Linux? I mean what is required in ...
2
votes
3answers
211 views

Optimizing c++ compiliation for a specific machine

I am programming a code to simulate a membrane which will run on computation cluster (single node). I want to optimize the code for that machine. I have used the -optimize, -O3 and -march=core2. How ...
2
votes
1answer
70 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
2answers
1k views

ethtool get permanent MAC address returns all 0's

I need to read permanent (burned-in) MAC address of network adapter. Since MAC address can be easily spoofed, I need to read the real one which is written on EEPROM. I need to do it using C++ on ...
2
votes
1answer
1k views

Ubuntu 12.04 c++ development system install

I am trying to install the Intel Parallel Studio 2013 on Ubuntu 12.04. During installation I received a failure notice that the command g++ was missing. I asked Intel and they indicated that the C++ ...
2
votes
2answers
155 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 ...
2
votes
1answer
257 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 ...
2
votes
1answer
320 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
2answers
119 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 ...
2
votes
1answer
467 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 ...
2
votes
2answers
73 views

uXlib.h Which package have this lib file?

I am getting an error uXlib.h not found while compiling a program, written in c++ I think the lib file is related UIM/X from the following link motif.ics.com/sites/default/files/ReferenceManual.pdf‎ ...
2
votes
1answer
5k views

C++ compile in Arch Linux with no g++ package in repositories

I wanna compile a C++ program in Arch Linux, but there's no "g++" package as there is in Ubuntu repositories for example. Using -x too won't work. like this: gcc -x c++ -o myprog myprog.cpp
2
votes
1answer
338 views

Can Qt SDK be used for development on any Linux distro?

Fisrt of all I am a Windows developer guy but really like Linux. On Windows, Visual Studio provides an excellent IDE for C and C++ development. The only other IDE and toolkit I like is the Qt SDK and ...
2
votes
1answer
47 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 ...
2
votes
1answer
2k 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
287 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
202 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.
2
votes
0answers
141 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:- ...
2
votes
1answer
685 views

How to install CLang using precompiled binaries? [closed]

How do I install CLang on Ubuntu, using precompiled binaries of CLang that I downloaded? Here's how I downloaded CLang: "LLVM Download Page" -> "Download LLVM 3.2" -> "Clang Binaries for ...
2
votes
0answers
381 views

Stereo capture with v4l2

I am trying to capture images from 2 cameras using the driver v4l2. I want to capture them at the same time so I use threads with conditions to start the capture at the same time. The problem is that ...
1
vote
1answer
3k views

“Permission denied” for running an executable file on a linux machine

I once generated an executable file using g++ on a linux box. But when I try to run this executable file on another linux machine, the system said "Permission denied". However, after I re-compile the ...
1
vote
3answers
60 views

execute file in server more safely?

We have a application which takes a C++, C, or Java file as input, executes it, and displays the output to the client. What are the best measures that can be taken so that no security related issues ...
1
vote
3answers
938 views

What libraries are there for reading/editing ID3s of mp3?

I think the title says it all. I need a library to allow me to read and edit ID3 Tags from C++ in Linux. Suggestions?
1
vote
3answers
674 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 ...
1
vote
2answers
50 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 ...
1
vote
1answer
268 views

Recording and charting boot process information in Linux

I need to write a command line tool that records the boot process information in Linux, and then renders it in a chart format (a textual chart would do). How do I programmatically obtain the this boot ...
1
vote
1answer
101 views

continuous testing of a C++ project on github with different Linux distros

Is there any framework to automatically try to compile a C++ project on github.com on every commit made, similar to what http://jenkins-ci.org or http://travis-ci.org do for different compilers on an ...
1
vote
1answer
62 views

which distributions to test for successful compilation? [closed]

I've got a package written in C++ using boost libraries and a bunch of helper scripts, and I want to make sure it's easy to compile for most Linux x86_64 distributions. It uses cmake and downloads the ...
1
vote
1answer
4k views

How to update the version of gcc-c++ on Fedora?

I have version 4.4.4 of gcc installed and would like to update to either a specific version or to the latest version. Here is what I have tried: sudo yum install gcc-c++ this tells me that Package ...
1
vote
1answer
203 views

Set up proper programming environment

I'm starting to think how to set up the most convenient environment for programming, with the following conditions. I run Linux Mint 14. I've got a computer at work but would like to have access to ...
1
vote
2answers
425 views

Testing C++ code with bash commands

I've read a programming problem and then I wrote code for it. But I thought my algorithm was not working right, so I wrote another piece of code that it was not optimal but, I think, correct. Now I ...
1
vote
1answer
372 views

How to set clang++ as the c++ compiler?

I'm trying to set clang++ as the system C++ compiler on Fedora 18. I have installed clang and added it to alternatives but it doesn't appear to be working. [user@localhost ~]$ alternatives --display ...
1
vote
2answers
3k views

moc command not found?

On my Gentoo systems I've never had a problem with this and I run moc as I run any other command in the terminal. I recently switch to Fedora 15/16 and notice that running moc doesn't work. I get ...
1
vote
1answer
1k views

How do I make a multi-threaded app use all the cores on Ubuntu under VMWare?

I have a multi-threaded C++ app (using pThreads) that processes a massive flat file that works great on Windows - uses all four cores on my puny CPU. Client wants to run the same code on Red Hat on a ...