Next gcc46 Problem
Ryan Schmidt
ryandesign at macports.org
Tue Jul 20 15:14:38 PDT 2010
On Jul 20, 2010, at 12:58, Johannes Ruscheinski wrote:
> After finally successfully installing gcc46 and compiling a tiny test
> program with
>
> gcc-mp-4.6 -std=gnu++0x AutoTest.cc
>
> I get:
>
> Undefined symbols:
> "std::ios_base::Init::Init()", referenced from:
> __static_initialization_and_destruction_0(int, int) in ccyAO1Lq.o
> "std::ios_base::Init::~Init()", referenced from:
> __static_initialization_and_destruction_0(int, int) in ccyAO1Lq.o
> "std::basic_ostream<char, std::char_traits<char> >& std::endl<char,
> std::char_traits<char> >(std::basic_ostream<char,
> std::char_traits<char> >&)", referenced from:
> _main in ccyAO1Lq.o
> "std::basic_ostream<char, std::char_traits<char>
>> ::operator<<(std::basic_ostream<char, std::char_traits<char> >&
> (*)(std::basic_ostream<char, std::char_traits<char> >&))", referenced
> from:
> _main in ccyAO1Lq.o
> "std::basic_ostream<char, std::char_traits<char>
>> ::operator<<(int)", referenced from:
> _main in ccyAO1Lq.o
> "std::cout", referenced from:
> _main in ccyAO1Lq.o
> ld: symbol(s) not found
> collect2: ld returned 1 exit status
>
> How can I resolve this?
Do you have any environment variables whose names begin with "DYLD" (check by typing "env"), or do you have anything installed in /usr/local? These things can interfere.
If that's not it, you may need to ask the developers of gcc.
Of course I could not attempt to replicate the problem on my system because:
$ gcc-mp-4.6 -std=gnu++0x AutoTest.cc
gcc-mp-4.6: error: AutoTest.cc: No such file or directory
gcc-mp-4.6: fatal error: no input files
compilation terminated.
If you'd like us to try, supply the source file you used.
More information about the macports-users
mailing list