You are not logged in.

#1 2008-10-28 05:20:44

jnengland77
Member
From: Black Hills, USA
Registered: 2005-05-06
Posts: 111

GLIBCXX_3.4 not defined [solved]

I'm trying to compile a C++ program (for school), but I'm getting an error.

Error:
./mymain: relocation error: ./mymain: symbol _ZNKSt9basic_iosIcSt11char_traitsIcEEcvPvEv, version GLIBCXX_3.4 not defined in file libstdc++.so.6 with link time reference

It was working a couple days ago.

I tried recompiling libstdc++5, but it didn't help.

I don't know much about this library, so some help would be nice.

~jnengland77

Last edited by jnengland77 (2008-10-28 23:20:31)

Offline

#2 2008-10-28 06:32:36

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,393
Website

Re: GLIBCXX_3.4 not defined [solved]

From the error message the problem appears to be in libstdc++.so.6 which is in gcc-lib so recompiling libstdc++5 would have done nothing...

How are you compiling the program and what did you change in the last couple of days?

Offline

#3 2008-10-28 06:43:32

jnengland77
Member
From: Black Hills, USA
Registered: 2005-05-06
Posts: 111

Re: GLIBCXX_3.4 not defined [solved]

Well I'm just compiling use g++ -o mymain mymain.cpp  or make (e.g. make mymain ). 

As far as changes I hadn't updated in a while so I updated I think last Friday.  I think there was like 400 MB in downloads.  I can't remember what was updated.  It must have been from that night though.  Since it worked that night, but I haven't compiled anything till now (been rebooted a couple times since then).

I haven't rebooted my desktop for a while, and recently updated it, too.  But it's more frequently updated.  Till I get the laptop to compile stuff I'll be leaving the desktop running.

~jnengland77

UPDATE:  I think I fixed the problem by reinstalling gcc and gcc-lib.  And maybe using more parameters for g++ such as -g -Wall  and-Os .  There after it fixes make, too.  I don't quite understand why that fixed it, unless it was the reinstall of gcc and gcc-libs that did it.

Last edited by jnengland77 (2008-10-28 07:03:35)

Offline

#4 2008-10-28 07:01:23

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,393
Website

Re: GLIBCXX_3.4 not defined [solved]

Are you linking to any external libraries or is it just plain C++?

Offline

#5 2008-10-28 07:05:52

jnengland77
Member
From: Black Hills, USA
Registered: 2005-05-06
Posts: 111

Re: GLIBCXX_3.4 not defined [solved]

Just plain C++.  See my last post I think it corrected itself.

Oh and thanks for helping me out.

Last edited by jnengland77 (2008-10-28 07:11:27)

Offline

Board footer

Powered by FluxBB