Stlport linking errors with xlC on AIX

P

pervinder

Hi,
When i link a C++ test app with stlport, it throws some errors on AIX
like

Linking ../../output/AIX_32/bin/test
"/hm/test/stlport/stl/_fstream.h", line 30.11: 1540-0836 (S) The
#include file <stl/_streambuf.h> is not found.
"/hm/test/stlport/stl/_fstream.h", line 34.10: 1540-0836 (S) The
#include file <stl/_istream.h> is not found.
.....

I tried providing -D_STLP_NO_OWN_IOSTREAMS, but it did not help.
Any expert comments on this? The same code works on solaris and Lnx OS

Regards, ~Pervinder
 
D

David Lindauer

the problem is *probably* due to a difference in the way the compilers
interpret the

#include <...>

construct.

I'm not sure about C++, but in C there is a semantic difference between
this and using quotes that is governed by implementation-defined
behavior. Basically <> quoting is specified to be tighter than "" quoting
in terms of where it looks for include files. If I had to guess, the AIX
compiler has a very tight definition for <> quoting which limits it to
looking on the compiler's 'system' include path (where the RTL includes
are installed), whereas the other compilers have a looser definition of it
which is why they can find the files.

To solve it, you'd be best finding out how to tell AIX compiler to add the
STLPORT directories to the standard system include path. This may or may
not be possible depending on compiler design. Other solutions include
moving STLPORT itself into the standard system include path, or going
through the STLPORT headers replacing the <> version of the includes with
the "" version.

David
 

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,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top