Next gcc46 Problem

Ryan Schmidt ryandesign at macports.org
Wed Jul 21 22:55:10 PDT 2010


On Jul 22, 2010, at 00:38, Johannes Ruscheinski wrote:
> On Tue, Jul 20, 2010 at 3:14 PM, Ryan Schmidt wrote:
>> On Jul 20, 2010, at 12:58, Johannes Ruscheinski wrote:
>>> 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
>> 
>> 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;
> }

I get the same as you. So either this is not how GCC is meant to be used (ask the developers of GCC how it's meant to be used) or there is a bug in GCC (ask the developers of GCC to fix it) or there is some alternate way we need to install GCC so it installs properly (ask the developers of GCC what we need to change in our packaging to make it work).




More information about the macports-users mailing list