Next gcc46 Problem
Johannes Ruscheinski
ruschein at gmail.com
Wed Jul 21 22:38:44 PDT 2010
On Tue, Jul 20, 2010 at 3:14 PM, Ryan Schmidt <ryandesign at macports.org> wrote:
> 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.
Just checked => No
>
> 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.
>
>
>
Here are the file's contents:
#include <iostream>
int main() {
auto i = 5;
std::cout << i << std::endl;
}
--
Johannes
Obligatory current favourite quotes:
"Religion is regarded by the common people as true, by the wise as
false, and by the rulers as useful".
-- Seneca
"I have more confidence in the methods of science, based on the amazing
record of science and its ability over the centuries to answer
unanswerable questions, than I do in the methods of faith (what are they?)."
-- David J. Gross "Physics Nobel Laureate"
"Atheism is a religion to the same extent that not collecting stamps is a
hobby."
-- seen on Slashdot.org
More information about the macports-users
mailing list