Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cannot run C++ compiled programs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 522

PostPosted: Thu Nov 19, 2009 12:11 am    Post subject: cannot run C++ compiled programs Reply with quote

hello.c
Code:

#include<stdio.h>
int main()
    {
    printf("hello C is working\n");
    }


hello.cc
Code:

#include <iostream> // per std::cout e std::endl
using namespace std;
int main()
    {
    cout << "hello C++ is working" << endl;
    return 0;
    }






test1:
gcc hello.c -o t1
./t1
Quote:

hello C is working





test2:
g++ hello.cc -o t2
./t2
Quote:

symbol lookup error: /usr/lib/gcc/mipsel-unknown-linux-gnu/4.1.2/libgcc_s.so.1: undefined symbol: GCC_3.0, version GCC_3.0





gcc -v
Quote:

Using built-in specs.
Target: mipsel-unknown-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/configure --prefix=/usr --bindir=/usr/mipsel-unknown-linux-gnu/gcc-bin/4.1.2 --includedir=/usr/lib/gcc/mipsel-unknown-linux-gnu/4.1.2/include --datadir=/usr/share/gcc-data/mipsel-unknown-linux-gnu/4.1.2 --mandir=/usr/share/gcc-data/mipsel-unknown-linux-gnu/4.1.2/man --infodir=/usr/share/gcc-data/mipsel-unknown-linux-gnu/4.1.2/info --with-gxx-include-dir=/usr/lib/gcc/mipsel-unknown-linux-gnu/4.1.2/include/g++-v4 --host=mipsel-unknown-linux-gnu --build=mipsel-unknown-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-libunwind-exceptions --disable-multilib --enable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,treelang,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 4.1.2 (Gentoo 4.1.2 p1.0.2)



ldd t1
Quote:

libc.so.6 => /lib/libc.so.6 (0x2ab08000)
/lib/ld.so.1 (0x2aaa8000)



ldd t2
Quote:

libstdc++.so.6 => /usr/lib/gcc/mipsel-unknown-linux-gnu/4.1.2/libstdc++.so.6 (0x2ab08000)
libm.so.6 => /lib/libm.so.6 (0x2ac26000)
libgcc_s.so.1 => /usr/lib/gcc/mipsel-unknown-linux-gnu/4.1.2/libgcc_s.so.1 (0x2aacc000)
libc.so.6 => /lib/libc.so.6 (0x2ace0000)
/lib/ld.so.1 (0x2aaa8000)












any idea ?
Back to top
View user's profile Send private message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 522

PostPosted: Fri Nov 20, 2009 9:31 am    Post subject: Reply with quote

emerging =sys-devel/gcc-4.1.2 fixed the issue

Quote:
rb532b gcc # mygcc-test
(*) testing C compiler ... hallo C is working
(*) testing C++ compiler ... hallo C++ is working
(*) testing C compiler about branch ... v[]={ -O(0): ok, -O(1): ok, -O(2): ok, -O(3): ok, EOL }


the branchtest it the one which issued the HPPA gcc-4.1.* very deep: fortunately my mips1-le has not that issue in his gcc
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum