G++ is the C++ front-end of the Gnu Compiler Collection (GCC)

learn more… | top users | synonyms

1
vote
1answer
3k views

How to compile a c++11 program using future in Ubuntu 12.04?

I'm trying to compile a c++ program in Ubuntu 12.04. I'm using g++ 4.7 (installed from a ppa). I'm using std::future, but I have an error. The code: $ cat main.cpp #include <iostream> ...
0
votes
1answer
4k views

How to compile c11 iso standard code with g++ compiler

System Details: $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=12.04 DISTRIB_CODENAME=precise DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS" $ g++ --version g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) ...
1
vote
2answers
5k views

gcc and g++ are installed but ubuntu says they are not installed

I have installed g++ and gcc from repository on ubuntu 12.04 ad you can see that they are indeed installed mahmood@pc:~$ dpkg -l | grep gcc ii gcc-4.4 4.4.7-1ubuntu2 ...
5
votes
3answers
1k views

How do I compile/run C++ code in the console?

I'm trying to run my C++ code using the console. I used the header file conio.h like I did when I used Turbo C++ IDE in Windows, and I ran the code in console using g++ filename.cpp I have ...
2
votes
1answer
862 views

When will GCC support C++11 regex_token_iterator?

When will GCC support for C++11 regex_token_iterator? Some of regex seems to be implemented, but the token iterator is not supported yet in my 32-bit Ubuntu/Linaro (version 4.7.2-4precise1) ...
1
vote
1answer
215 views

Restoring gcc and g++ flags

I've recently done something really stupid: I wanted to configure NetCDF libraries using the Intel Fortran compiler and, therefore, I was following instructions for that kind of procedure. ...
1
vote
1answer
414 views

linking cpp object file to c object file and create executable

Suppose i have a c++ file, created an object file and c file created another object file. Now i need to link both into one executable. While i'm trying it is giving errors about c++ not found. Can ...
6
votes
1answer
10k views

How to install g++ 4.8?

I have G++ 4.7.2 on my Ubuntu 12.04 and I'm trying to install 4.8. I downloaded the file from the GNU repository. After configure and make, I get the following error: collect2: error: ld returned 1 ...
2
votes
0answers
58 views

Cannot connect to ubuntuarchive.hnsdc.com, how to install g++? [duplicate]

Possible Duplicate: ‘Some index files failed to download’ while updating I am using Ubuntu 10.04. I typed sudo apt-get install g++ in the terminal and got the following output. I can't ...
0
votes
1answer
67 views

G++ execution Problem but compiles successfully

Hello Friends, can anybody explain me what is the error in this procedure of compiling and executing a c++ program file.
2
votes
1answer
484 views

Ubuntu Precise system headers moved somewhere else and sys/ucontext.h cannot be found

I'm in the process of porting some applications from Maverick 10.10 to Precise 12.04. Some of the system headers do not seem to be in the same place. This is giving me some headaches since it doesn't ...
3
votes
1answer
392 views

Can't find new.h - getting gcc-4.2 on Quantal?

I've been trying to compile the Valve Source SDK (2007) on my machine, but I keep running into the same error: In file included from ../public/tier1/interface.h:50:0, from ...
1
vote
1answer
684 views

how to install g++ and openJDK from .deb package [duplicate]

Possible Duplicate: How can I install software or packages without Internet (offline)? I have recently started using ubuntu 12.04 for my dell inspiron 5500 15r. I want to install g++ and ...
4
votes
1answer
2k views

I can't compile a C++ program with the g++ command

If I try compiling my C++ source file by the following command: g++ a.cpp it outputs: The program 'g++' can be found in the following packages: * g++ * pentium builder try: sudo apt-get intsall ...
1
vote
1answer
1k views

libxml2 package installed but cannot include, building libaiml

I am trying to build a library (libaiml). I was having problems installing the library using normal methods: ./configure ; make ; make install In the README, the author says you should use this ...
1
vote
1answer
2k views

How to install a specific version of g++?

In my Ubuntu there is g++ --version - g++ (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO ...
1
vote
3answers
4k views

Cannot install g++ on 12.10 [duplicate]

sudo apt-get install g++ Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an ...
3
votes
1answer
949 views

geany cannot run file built by g++ on kubuntu

I used geany and g++ on Ubuntu, they were working just fine. But now I just installed Kubuntu, and geany just doesn't work as usual. Geany builds and compiles with g++, but it cannot run the file. ...
0
votes
0answers
126 views

Program exits when building in mingw studio in ubuntu

Is anyone here who uses mingw developer studio in ubuntu? I found this arhive: http://www.iit.upcomillas.es/libroc/mingw-devstudio_linux-2.06.tar.gz I launch the program and everything works well ...
2
votes
3answers
1k views

How to see object code generated by g++?

g++ -c xyz.cpp creates an object file xyz.o But when I open it in vim editor it shows some crazy text... How can I see the machine code? What package can use to open and see that machine code?
4
votes
1answer
6k views

Why can't I install g++?

while trying to compile a program with the following command: g++ -o <output_file> <my_file.cpp> I found the following report.... The program 'g++' can be found in the following ...
4
votes
5answers
23k views

Eclipse Juno C++ error: Program “g++” not found in PATH

I installed the newest Eclipse Juno manually (not through software center nor apt-get), and then install Eclipse CDT from the help > install new software menu. However, when I try to compile a simple ...
3
votes
2answers
569 views

Using 12.04, can I compile packages with gcc for 10.04?

My development machine is running Precise, but some of my target servers are still running Lucid. I'm trying to set up my dev machine so that it can compile c/c++ for both Lucid and Precise. I already ...
1
vote
2answers
8k views

How to upgrade g++ to 4.7.1?

Richard Holloway's answer to this thread nicely explains how to upgrade from 4.6.3 to 4.7.0 (on 12.04, in my case) but I would like to upgrade to 4.7.1, which has been available for awhile. However ...
2
votes
1answer
938 views

Why is the GCC 4.7 PPA not upgrading to 4.7.1?

I would like to install from repository (without compilation from source) the latest g++ 4.7.1 on Ubuntu 12.04. I know I can install g++ 4.7.0 according to this tutorial. I have also found the g++ ...
0
votes
2answers
518 views

How can I get gcc to find certain libraries?

I am trying to compile a program (gcc, using some functions from intel's ipp library). It is my first use of ipp, so I think I might be doing some not very clever mistake. Anyhow: g++ -o inteltrial ...
5
votes
1answer
12k views

How do I find what version of libc my application links to?

When building an application using g++, I am not explicitly passing the libc library as a library to link to in the same way you would for other libraries (like passing -lpthread for example). I know ...
0
votes
2answers
2k views

g++ cannot find include files (qt3)

allan@allan-VirtualBox:~/blackjack_for_the_hopelessly_luckless$ make g++ -c -pipe -g -Wall -W -O2 -D_REENTRANT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT ...
1
vote
1answer
626 views

Problem Compiling with link -lstdc++

I'm new using Linux (Ubuntu 12.04 LTS, 64-bit). I am trying to learn how to create binary files for a program called Tecplot. I've been trying to compile the example file simtest.f90, using this: $ ...
0
votes
1answer
1k views

Installing g++ on 8.04

I am running Ubuntu 8.04 (currently I do not have the option to upgrade due to hardware problems). I need to get g++ onto my installation but as this is no longer supported I am unable to use the ...
0
votes
1answer
2k views

GLIBCXX 3.4.14 on Ubuntu 10.04

Is there a way of getting GLIBCXX 3.4.14 on Ubuntu 10.04? I am trying to use the Z3 solver from Microsoft in my research but it requires at least GLIBCXX 3.4.14 which is not available in my setup. ...
2
votes
3answers
823 views

Can I use the 2.6 kernel provided with my embedded system to run 12.04?

In summary I am quite new to Linux, but have the task of writing some software. The software has to run on a particular hardware board and the manufacturers of this board have provided a custom build ...
0
votes
1answer
518 views

update g++ through synaptic package manager

Currently g++ 4.4.3 is installed on my Ubuntu, but I want to update it to 4.6.3 version. When I search "g++" in synaptic package manager there is nothing about newer versions. How can I update my g++ ...
5
votes
2answers
2k views

When I attempt to remove g++ why does apt-get attempt to install it? [closed]

Note: Originally I had a long background explanation leading up to why I was trying to perform apt-get remove g++. I have deleted that as irrelevant after trying this in a clean install of 11.10 ...
1
vote
3answers
612 views

What version of OpenGL does G++ have?

I'm going to buy an OpenGL book from Amazon but there are different versions for OpenGL 2, 3 and 4. Which one does G++ use?
2
votes
2answers
2k views

Can't find g++ in Software Center

I have a fresh install of Ubuntu 11.10 and I tried to install g++. Unfortunately I did not find it in the Software Center. In the sources list the boxes for universe and main are checked. Any ...
21
votes
3answers
18k views

Where can I find a g++ 4.7 package?

Some time ago, I managed to find PPA featuring g++-4.7 build. However, I had to reinstall everything on my machine and I lost name of that PPA. Could anyone point me to it? I tried to find it again, ...
0
votes
3answers
3k views

Compiling a libusb example program

I recently installed the library libusb by doing this: sudo apt-get install libusb-1.0-0-dev I have a directory with examples that looks like this: ...
2
votes
2answers
623 views

Which package should I download to compile C++0x code

OS is Ubuntu 10.04. I need to compile some C++ code with -std=c++0x flag. But compiling doesn't work because I need 4.6.1 version. Now, when I go to Gnu's ftp, I see two different packages: ...
2
votes
4answers
30k views

Eclipse can't find index libraries of GCC or G++

The instalation of CDT Tools on Eclipse can't find on index libraries of GCC or G++, but the file is running. Ex: include stdio.h (The comment doesn't accept <> and #) The are a yellow line ...
1
vote
1answer
478 views

g++ and boost linker error after upgrade

I am getting the following problems. I am sure it is a package that was not install/upgraded properly, I am not sure which one: $ make g++ -I/usr/include/boost -MM ./YYY.cc ./main.cc ./myClass.cc ...
0
votes
1answer
303 views

g++ behaving strangely with libssl

I've been trying to use the RSA C library on a C++ application (since it seems like the proper way to do it, due to the lack of an "official" [read: OpenSSL] C++ implementation). The thing is, ...
0
votes
1answer
2k views

Error message when running “make” command: /usr/bin/ld: i386 architecture of input file is incompatible with i386:x86-64 output

I am unable to create a working executable file by running the make command in a tree previously built on an i386 machine. I'm getting an error message in the form of me@me-desktop:~$ make ...
3
votes
1answer
3k views

What package provides -llua for g++?

I've installed all lua5.1 development packages from Synaptic and the g++ linker can not find -llua. I've read on some other question that it is possible that -llua has some other name and that I ...
5
votes
1answer
853 views

Does g++ compiler have graphical user interface?

As the question says, I wonder if the default ubuntu compiler, g++, has graphical user interface.
1
vote
0answers
922 views

Compiling g++ 4.7.0 in 11.04 [closed]

I encountered the following problem while compiling g++ 4.7.0. The file asm/errno.h is not found because it is being search for in /usr/include/linux/ instead of /usr/include/x86_64-linux-gnu, which ...
1
vote
2answers
1k views

g++-4.3 not in repos anymore, how to install it?

I'm on Ubuntu 11.04 and need g++-4.3 for a project. What is the best way to install it, since it is not present in the repositories anymore. Do I have to build it from source or is there a better ...
2
votes
1answer
7k views

How to get 32 bit version of libraries on Ubuntu 64 bit?

I'm trying to compile a program which uses Google's V8 library (which is 32 bit). Therefore any library I use within my program also has to be 32 bit. Where can I download the 32 bit version of ...
43
votes
3answers
89k views

Choose gcc and g++ version

So I have installed gcc-4.4 and gcc-4.3 (same for g++). Now as far as I remember there is a tool in Ubuntu which sets the symlinks for you if you just tell it which version you want. However it does ...