Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Reading C++ error messages

40 views
Skip to first unread message

jacobnavia

unread,
Apr 22, 2016, 7:57:57 AM4/22/16
to
Undefined reference to:

"std::__1::ios_base::getloc() const", referenced from:
ServerMain(int, char**, bool) in libdatabaselibrary.a(ServerMain.o)
std::__1::basic_ostream<char, std::__1::char_traits<char> >&
std::__1::__put_character_sequ ence<char, std::__1::char_traits<char>
>(std::__1::basic_ostream<char, std::__1::char_traits<char > >&,
char const*, unsigned long) in libdatabaselibrary.a(ServerMain.o)

(etc)

Now, the letter sequence "getloc" does NOT appear in the file
ServerMain.cpp.

How could I figure out what is wrong and where?

Thanks in advance for any hints.

jacob

Victor Bazarov

unread,
Apr 22, 2016, 8:25:55 AM4/22/16
to
I can only speculate that the 'getloc' resides in a template
implementation (of '__put_character_sequence') which in turn is pulled
in by the compiler when you call some function (like a member of the
'basic_ostream') in 'ServerMain'. Make sure to include all the relevant
libraries for the use of 'basic_ostream'. Since it is likely
implementation-specific, RTFM.

V
--
I do not respond to top-posted replies, please don't ask

Paavo Helde

unread,
Apr 22, 2016, 10:33:21 AM4/22/16
to

woodb...@gmail.com

unread,
Apr 22, 2016, 6:56:37 PM4/22/16
to
On Friday, April 22, 2016 at 9:33:21 AM UTC-5, Paavo Helde wrote:
> On 22.04.2016 14:57, jacobnavia wrote:
> > Undefined reference to:
> >
> > "std::__1::ios_base::getloc() const", referenced from:
> > ServerMain(int, char**, bool) in libdatabaselibrary.a(ServerMain.o)
> > std::__1::basic_ostream<char, std::__1::char_traits<char> >&
> > std::__1::__put_character_sequ ence<char, std::__1::char_traits<char>
> > >(std::__1::basic_ostream<char, std::__1::char_traits<char > >&,
> > char const*, unsigned long) in libdatabaselibrary.a(ServerMain.o)
> >
> > (etc)
> >
> > Now, the letter sequence "getloc" does NOT appear in the file
> > ServerMain.cpp.
> >
> > How could I figure out what is wrong and where?
>
> By googling of course!
>

I like Duckduckgo as an alternative to Google.

https://duckduckgo.com


Brian
Ebenezer Enterprises - In G-d we trust.
http://webEbenezer.net

jacobnavia

unread,
Apr 23, 2016, 3:56:16 AM4/23/16
to
Thanks. I was using the original gcc in some of my projects/libraries.
Now, that is very difficult to know since llvm is called "gcc" in the
macintosh... I did not notice it.

Thanks again
0 new messages