Stlport linking errors with xlC on AIX

Discussion in 'C++' started by pervinder, Sep 23, 2004.

  1. pervinder

    pervinder Guest

    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
     
    pervinder, Sep 23, 2004
    #1
    1. Advertising

  2. 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
     
    David Lindauer, Sep 24, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Graat
    Replies:
    0
    Views:
    603
    John Graat
    Aug 26, 2004
  2. alban

    Compilation Problems on a AIX with XLC

    alban, Feb 8, 2006, in forum: C Programming
    Replies:
    6
    Views:
    931
    Jordan Abel
    Feb 9, 2006
  3. ChrisG
    Replies:
    1
    Views:
    464
    Thomas Tutone
    Nov 28, 2005
  4. ClownPleco

    putenv for AIX and ifdef for AIX

    ClownPleco, Aug 22, 2007, in forum: C Programming
    Replies:
    5
    Views:
    1,197
    Thomas Dickey
    Aug 24, 2007
  5. Alex Vinokur
    Replies:
    4
    Views:
    1,153
    Gary R. Hook
    Apr 10, 2010
Loading...

Share This Page