Opened 12 years ago

Last modified 8 years ago

#35593 assigned defect

gcc47 @4.7.1, Revision 2 -- Undefined symbols from standard library

Reported by: rob.patro@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc:
Port: gcc47

Description

The simple attached file reproduces the error. It should be built with

g++-mp-4.7 -std=c++11 test.cpp

it produces the following linking error:

Undefined symbols for architecture x86_64:
  "std::regex_token_iterator<__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, char, std::regex_traits<char> >::regex_token_iterator(__gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::basic_regex<char, std::regex_traits<char> > const&, int, std::bitset<11ul>)", referenced from:
      _main in cccDMjnE.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status

The problem does not appear under the system's default clang++ compiler. The regex symbols are part of the standard library and should be present and properly linked with the test code.

Attachments (1)

test.cpp (834 bytes) - added by rob.patro@… 12 years ago.

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by rob.patro@…

Attachment: test.cpp added

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to mww@…
Port: gcc47 added
Priority: HighNormal

comment:2 Changed 8 years ago by kurthindenburg (Kurt Hindenburg)

Owner: changed from mww@… to macports-tickets@…
Status: newassigned
Note: See TracTickets for help on using tickets.