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

learn more… | top users | synonyms

1
vote
1answer
66 views

Is it possible to have two g++ executables with shared lib?

It might sound weird but I do want to have two g++ executables. One in normal /usr/bin/g++ which is currently working well. The other under /sandbox/g++ that is protected by apparmor. However when I ...
2
votes
1answer
2k views

./ 1.cpp commands gives error: bash: ./: Is a directory [closed]

After vi 1.cpp I write my C++ Program. g++ 1.cpp -o 1.out works fine. But ./ 1.out gives Error: bash: ./: Is a directory
0
votes
1answer
116 views

Compilation problem for C++ program

How do I install g++ or pentium builder packages? Do I need to download those? Because when I try to compile the program and with this statement: g++ -Wall -W -Werror main.cpp -o HelloWorldCPP` ...
1
vote
1answer
1k views

g++ error “sstream.tcc:112:39: error: expected unqualified-id before ‘(’ token”

I tried to install install one program at Ubuntu and it uses main.cpp .I dont know why but it gives always error.(main.cpp syntax correct 100%) and this program works without error @Mac system but not ...
0
votes
2answers
190 views

Error while installing g++ [duplicate]

I am getting this error: sathiesh@sathiesh:~$ sudo apt-get install g++ [sudo] password for sathiesh: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable ...
-3
votes
1answer
303 views

Is Gcc 4.8.1 RELEASE available under raring 13.04 ? ( no snapshot, only release )

I need full c++11 support and I need gcc 4.8.1 release, I'm under Ubuntu 13.04 64 bit, there is a gcc-snapshot package in the repository, but it's outdated and it's an old pre-release version. It's ...
1
vote
1answer
135 views

How to debug executable (using gdb) that reads another file?

I have a small application let's call it program. In general to use this application I need to stream a file into it: ./program < file_with_data.txt How do I debug such program using dbg? I ...
0
votes
2answers
2k views

How to install gcc/g++ 4.4 and make links

Because I cannot compile some code by gcc/g++ 4.7, I want to install gcc/g++ 4.4. I searched the Internet and found some different way. I don't know what is the best solution. Is it possible to ...
0
votes
1answer
307 views

g++ fails to link to libmysqlclient

I use Ubuntu 12.04 on a virtual machine on my MacbookPro. I installed build-essential, mysql-server and libmysqlclient-dev. Both commands 'mysql' and 'mysql_config' work. However, the following ...
1
vote
1answer
4k views

How can i downgrade GCC 4.7.2?

i want to downgrade GCC and G++ 4.7.2 to some older versions, 4.0 perhaps. Any assistance? I'm using Lubuntu ATM.
6
votes
2answers
10k views

Ubuntu 13.04 with gcc/g++/gfortran 4.8 by default?

I plan to download and install Ubuntu 13.04 and I would like to have two compilers on my system. First question: what is the version of gcc/g++/gfortran shipped with ubuntu 13.04 ? (is it 4.7.3 ?). ...
0
votes
1answer
1k views

error in make: /usr/bin/ld: cannot find -lGL

I have a problem in makeing gpgpu-sim package in my Ubuntu. This is a ubuntu error and I do not know how to solve it in the make file I have this g++ -shared -Wl,-soname,libcudart.so \ ...
1
vote
3answers
33k views

g++ Installation

I tried installing gpp in my Ubuntu 12.04, but I can't install it. It reports, sudo apt-get install gpp [sudo] password for akash: Reading package lists... Done Building dependency tree ...
1
vote
1answer
1k views

Eclipse and the g++ - how is it work

I am using ubuntu 12.04. I have eclipse juno. I wrote test.cpp : #include <iostream> using namespace std; int main() { cout << "!!!Hello World!!!" << endl; // prints !!!Hello ...
1
vote
1answer
2k views

dlclose does not call library destructors, dlopen called just once

consider the following code for a dynamic loaded library built with g++-4.7 on linux, -fPIC and linked with -rdynamic option: typedef std::vector< void* > cbRegister_t; struct Wrapper ...
2
votes
2answers
516 views

Can't install g++ in Software Center

I can't install g++ in software center. I can install other programs. For example, after I found g++ can't be installed, I installed chrome for test purpose through software center, and it worked! ...
0
votes
1answer
5k views

How to make g++ find my header file? [on hold]

I tried to compile my .cpp using g++. I wrote this in the terminal: g++ Documents/cpp/demo.cpp -o Documents/cpp/demo I had included conio.h, but somehow it does not recognise it and gives an error. ...
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
882 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
259 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
461 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
62 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
74 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
510 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
431 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
749 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
995 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. ...
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
24k 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
585 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
941 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
551 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 ...
6
votes
1answer
14k 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
691 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
848 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
533 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 ...