By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,023 Members | 1,235 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,023 IT Pros & Developers. It's quick & easy.

Linker errors on Compaq comiling C++ application using STL

P: n/a
Hi,
I am trying to use the STL for C++ on Compaq. From what I read in
the man pages and several online documentation, it is recommended that
in order to use the STL on COMPAQ , I need to use the following flag -
__USE_STD_IOSTREAM. The compilation goes through fine, but at the
linking time, I get the following errors -
Unresolved:
std::basic_istream<char, std::char_traits<char> >::getline(char*,
long, char)
std::basic_ifstream<char, std::char_traits<char>
::basic_ifstream(const char*, int, long)
std::basic_ifstream<char, std::char_traits<char>::~basic_ifstream(void)

std::basic_istream<char, std::char_traits<char> >::putback(char)
std::basic_istream<char, std::char_traits<char> >::peek(void)
std::operator >>(std::basic_istream<char, std::char_traits<char> >&,
char*)
std::ws(std::basic_istream<char, std::char_traits<char> >&)
std::basic_ostringstream<char, std::char_traits<char>,
std::allocator<char> >::b
asic_ostringstream(int)
std::basic_ostream<char, std::char_traits<char> >::operator
<<(std::ios_base& (*
)(std::ios_base&))
std::basic_istream<char, std::char_traits<char> >::get(char*, long,
char)
std::basic_istream<char, std::char_traits<char> >::operator
(std::ios_base& (*

)(std::ios_base&))
*** Exit 1
Any idea why this is happening.
I am using the cxx compiler version
Compaq C++ V6.3-002 for Compaq Tru64 UNIX V5.1 (Rev. 732)
Compiler Driver V6.3-002 (cxx) cxx Driver

I have also tried to explicitly link with the libcxxstd.a file, but
that also does not seem to resolve this issue. Any guesses what is
happening here, and what options do I have. Am I missing a patch of
somekind, in order to have the STL support?

Any help would be very much appreciated.

Thanks and Regards,
Abhi
Jul 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Abhishek wrote:
Hi,
I am trying to use the STL for C++ on Compaq. From what I read in
the man pages and several online documentation, it is recommended that
in order to use the STL on COMPAQ , I need to use the following flag -
__USE_STD_IOSTREAM. The compilation goes through fine, but at the
linking time, I get the following errors -
Unresolved:
std::basic_istream<char, std::char_traits<char> >::getline(char*,
long, char)
std::basic_ifstream<char, std::char_traits<char>
::basic_ifstream(const char*,


int, long)
std::basic_ifstream<char, std::char_traits<char>
::~basic_ifstream(void)


std::basic_istream<char, std::char_traits<char> >::putback(char)
std::basic_istream<char, std::char_traits<char> >::peek(void)
std::operator >>(std::basic_istream<char, std::char_traits<char> >&,
char*)
std::ws(std::basic_istream<char, std::char_traits<char> >&)
std::basic_ostringstream<char, std::char_traits<char>,
std::allocator<char> >::b
asic_ostringstream(int)
std::basic_ostream<char, std::char_traits<char> >::operator
<<(std::ios_base& (*
)(std::ios_base&))
std::basic_istream<char, std::char_traits<char> >::get(char*, long,
char)
std::basic_istream<char, std::char_traits<char> >::operator
(std::ios_base& (*


)(std::ios_base&))
*** Exit 1
Any idea why this is happening.
I am using the cxx compiler version
Compaq C++ V6.3-002 for Compaq Tru64 UNIX V5.1 (Rev. 732)
Compiler Driver V6.3-002 (cxx) cxx Driver

I have also tried to explicitly link with the libcxxstd.a file, but
that also does not seem to resolve this issue. Any guesses what is
happening here, and what options do I have. Am I missing a patch of
somekind, in order to have the STL support?

Any help would be very much appreciated.

Thanks and Regards,
Abhi


Please contact your vendor regarding this.
We discuss the core language here and you have not presented any C++
code anyway.

--
Karthik.
Jul 22 '05 #2

P: n/a
"Abhishek" <ab******@gmail.com> wrote...
Hi,
I am trying to use the STL for C++ on Compaq. From what I read in
the man pages and several online documentation, it is recommended that
in order to use the STL on COMPAQ , I need to use the following flag -
__USE_STD_IOSTREAM. The compilation goes through fine, but at the
linking time, I get the following errors -
Unresolved:
std::basic_istream<char, std::char_traits<char> >::getline(char*,
long, char) [...] *** Exit 1
Any idea why this is happening.
I am using the cxx compiler version
Compaq C++ V6.3-002 for Compaq Tru64 UNIX V5.1 (Rev. 732)
Compiler Driver V6.3-002 (cxx) cxx Driver

I have also tried to explicitly link with the libcxxstd.a file, but
that also does not seem to resolve this issue. Any guesses what is
happening here, and what options do I have. Am I missing a patch of
somekind, in order to have the STL support?


Apparently, the standard _stream_ library is separate from run-time
one and needs to be linked explicitly. Look in your compiler docs
for guidance on how to add the C++ streams to the libraries to be
linked. Also, have you tried searching on the web for a possible
solution?

V
Jul 22 '05 #3

P: n/a
ab******@gmail.com (Abhishek) wrote in message news:<3c**************************@posting.google. com>...
Hi,
I am trying to use the STL for C++ on Compaq. From what I read in
the man pages and several online documentation, it is recommended that
in order to use the STL on COMPAQ , I need to use the following flag -
__USE_STD_IOSTREAM. The compilation goes through fine, but at the
linking time, I get the following errors -
Unresolved:
std::basic_istream<char, std::char_traits<char> >::getline(char*,
long, char) [snip]

*** Exit 1
Any idea why this is happening.
I am using the cxx compiler version
Compaq C++ V6.3-002 for Compaq Tru64 UNIX V5.1 (Rev. 732)
Compiler Driver V6.3-002 (cxx) cxx Driver
The Compaq compiler issues template instantiations into the
directory cxx_repository.

You must link against all object files in this directory
or add all these files to the archive.
Below is a snipet from our (GNU) makefiles:

In the platform specific makefile config.mk.tru64:

CXX_REPOSITORY = cxx_repository

In the application makefile (config.mk is a symbolic link
to the platform specific makefile):

include $(top_srcdir)/config.mk

$(ARCHIVE): $(ARCHIVE)($(OBJ))
@if test -n "$(CXX_REPOSITORY)"; then \
find $(CXX_REPOSITORY) -name "*.o" -type f | \
xargs $(AR) $(ARFLAGS) $@; \
fi
$(RANLIB) $@

Unless you need I won't explain the details ...

I have also tried to explicitly link with the libcxxstd.a file, but
that also does not seem to resolve this issue. Any guesses what is
happening here, and what options do I have. Am I missing a patch of
somekind, in order to have the STL support?

Any help would be very much appreciated.

Thanks and Regards,
Abhi


regards,
Stephan Brönnimann
br****@osb-systems.com
Open source rating and billing engine for communication networks.
Jul 22 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.