Linker errors on Compaq comiling C++ application using STL

A

Abhishek

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 said:
::basic_ifstream(const char*,
int, long)
std::basic_ifstream said:
::~basic_ifstream(void)
std::basic_istream<char, std::char_traits<char> >::putback(char)
std::basic_istream<char, std::char_traits<char> >::peek(void)
std::eek:perator >>(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> >::eek:perator
<<(std::ios_base& (*
)(std::ios_base&))
std::basic_istream<char, std::char_traits<char> >::get(char*, long,
char)
)(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
 
K

Karthik Kumar

Abhishek said:
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)


int, long)


std::basic_istream<char, std::char_traits<char> >::putback(char)
std::basic_istream<char, std::char_traits<char> >::peek(void)
std::eek:perator >>(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> >::eek:perator
<<(std::ios_base& (*
)(std::ios_base&))
std::basic_istream<char, std::char_traits<char> >::get(char*, long,
char)


)(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.
 
V

Victor Bazarov

Abhishek said:
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
 
S

Stephan Br?nnimann

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
(e-mail address removed)
Open source rating and billing engine for communication networks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,130
Latest member
MitchellTe
Top