Author Topic: [G++] Error library not found for -lstdc++  (Read 930 times)

@MeddleR

  • Noob
  • *
  • Posts: 31
  • Reputation: 5
[G++] Error library not found for -lstdc++
« on: December 07, 2012, 03:02:36 pm »
The error i get when trying to compile a helloworld shown here

#include <iostream>
using namespace std;
    int main() {
    cout << "Hello\n"; return 0;
}

is this error

ld: library not found for -lstdc++
collect2: ld returned 1 exit status

Does anyone know how to fix it?

h4ck3rpr0n3

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3063
  • Reputation: 130
  • Developer, Genius :P :P
  • Badges:
  • Computers: HP Pavillion g7: Windows 7, BT5 R1, Ubuntu 12.04, Windows 8, Linux Mint
  • iDevices: ipod touch 3g, ipod touch 2g
Re: [G++] Error library not found for -lstdc++
« Reply #1 on: December 07, 2012, 03:26:57 pm »
By default g++ doesn't know where to look for the stl libraries , did you set it up manually already? If not that's most likely your problem.
goals:
[] get developer status
[X] get 30+ karma
[X] get to hero member
[X] become part of the staff

languages i know:
JavaScript
CSS
HTML
PHP
C
C++
Cython
Python

@MeddleR

  • Noob
  • *
  • Posts: 31
  • Reputation: 5
Re: [G++] Error library not found for -lstdc++
« Reply #2 on: December 07, 2012, 05:15:58 pm »
export CPLUS_INCLUDE_PATH=/private/var/include/c++/4.0.0:/private/var/include/c++/4.0.0/i686-apple-darwin9

thats exactly what i did and when i try and

ln -s /usr/lib/libstdc++.6.0.9.dylib /usr/lib/libstdc++.dylib

it fails because: "the file already exists"
i have no idea about what the problem

h4ck3rpr0n3

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3063
  • Reputation: 130
  • Developer, Genius :P :P
  • Badges:
  • Computers: HP Pavillion g7: Windows 7, BT5 R1, Ubuntu 12.04, Windows 8, Linux Mint
  • iDevices: ipod touch 3g, ipod touch 2g
Re: [G++] Error library not found for -lstdc++
« Reply #3 on: December 07, 2012, 05:33:35 pm »
O k, i'm assuming you know to sign it too right?
goals:
[] get developer status
[X] get 30+ karma
[X] get to hero member
[X] become part of the staff

languages i know:
JavaScript
CSS
HTML
PHP
C
C++
Cython
Python

Trcx528

  • Haxor
  • Hero Member
  • *****
  • Posts: 4502
  • Reputation: 166
  • Google it!
    • iNinjas
  • Badges:
  • Computers: 13" 2011 Macbook Pro, 120 GB SSD and 16 GB of Ram
  • iDevices: None
Re: [G++] Error library not found for -lstdc++
« Reply #4 on: December 07, 2012, 09:03:51 pm »
search for libstdc++ on cydia and you will find a package that will fix your issue.  All the package does is symlink libSystem.dylib as libstdc++.dylib

Don't like seeing ads? Click here to register!

@MeddleR

  • Noob
  • *
  • Posts: 31
  • Reputation: 5
Re: [G++] Error library not found for -lstdc++
« Reply #5 on: December 07, 2012, 09:21:44 pm »
okay thanks and and Trcx @h4ck3rpr0n3 why yes i know how to sign but where were you getting at?

h4ck3rpr0n3

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3063
  • Reputation: 130
  • Developer, Genius :P :P
  • Badges:
  • Computers: HP Pavillion g7: Windows 7, BT5 R1, Ubuntu 12.04, Windows 8, Linux Mint
  • iDevices: ipod touch 3g, ipod touch 2g
Re: [G++] Error library not found for -lstdc++
« Reply #6 on: December 07, 2012, 09:37:42 pm »
I was just trying to eliminate problems. I figured I wasn't going to be able to get the solution before someone who knew what they were talking about stepped in but I did know that you have to sign the programs on idevice so just asked. :P :P
goals:
[] get developer status
[X] get 30+ karma
[X] get to hero member
[X] become part of the staff

languages i know:
JavaScript
CSS
HTML
PHP
C
C++
Cython
Python

@MeddleR

  • Noob
  • *
  • Posts: 31
  • Reputation: 5
Re: [G++] Error library not found for -lstdc++
« Reply #7 on: December 07, 2012, 09:44:01 pm »
ill double sign everything pr0n3 lol your contribution is valued and @Trcx528 i couldnt find libstdc++

h4ck3rpr0n3

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3063
  • Reputation: 130
  • Developer, Genius :P :P
  • Badges:
  • Computers: HP Pavillion g7: Windows 7, BT5 R1, Ubuntu 12.04, Windows 8, Linux Mint
  • iDevices: ipod touch 3g, ipod touch 2g
Re: [G++] Error library not found for -lstdc++
« Reply #8 on: December 07, 2012, 11:22:33 pm »
MeddleR, it's on the telesphoreo repo, make sure your set as developer status, mkay?
goals:
[] get developer status
[X] get 30+ karma
[X] get to hero member
[X] become part of the staff

languages i know:
JavaScript
CSS
HTML
PHP
C
C++
Cython
Python

@MeddleR

  • Noob
  • *
  • Posts: 31
  • Reputation: 5
Re: [G++] Error library not found for -lstdc++
« Reply #9 on: December 07, 2012, 11:42:27 pm »
thanks for that pr0n3 but i still cant find it

Don't like seeing ads? Click here to register!

h4ck3rpr0n3

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3063
  • Reputation: 130
  • Developer, Genius :P :P
  • Badges:
  • Computers: HP Pavillion g7: Windows 7, BT5 R1, Ubuntu 12.04, Windows 8, Linux Mint
  • iDevices: ipod touch 3g, ipod touch 2g
Re: [G++] Error library not found for -lstdc++
« Reply #10 on: December 07, 2012, 11:47:18 pm »
Really? Like you don't have the repo or...? It says something about a crucial sym link in the description, somewhere around C++ standard library for a name?
goals:
[] get developer status
[X] get 30+ karma
[X] get to hero member
[X] become part of the staff

languages i know:
JavaScript
CSS
HTML
PHP
C
C++
Cython
Python

@MeddleR

  • Noob
  • *
  • Posts: 31
  • Reputation: 5
Re: [G++] Error library not found for -lstdc++
« Reply #11 on: December 08, 2012, 02:39:49 am »
actually that description brings up a memory from my wild goose chase of g++ a few months ago but i know where to find the file thanks again @h4ck3rpr0n3

@MeddleR

  • Noob
  • *
  • Posts: 31
  • Reputation: 5
Re: [G++] Error library not found for -lstdc++
« Reply #12 on: December 08, 2012, 03:40:25 pm »
okay found the file but it's not changing anything, still giving me library not found