This discussion is archived
4 Replies Latest reply: Nov 28, 2011 9:02 AM by Steve_Clamage RSS

lack of libstlport4.so when ldd the program

901538 Newbie
Currently Being Moderated
Hi,to whom it may concern:

when I try to ldd program, I found there is a lack of libstlport4.so, so far as I know,I could only get this library through install sun studio, isn't it?

If I want to get this library without installing sun studio, when can i down this library?

Can I put this library along with our release?Or do I need any license to do this?
  • 1. Re: lack of libstlport4.so when ldd the program
    Steve_Clamage Pro
    Currently Being Moderated
    I can't tell from your post how you built your program. If you want to use STLport with your program built with Studio C++, you need to add the option
    -library=stlport4
    to every CC command, compiling and linking. The option needs to be used for the entire program, including any C++ shared libraries that you use.

    If you follow that procedure, you should find that libstlport.so.1 is linked to your program. To verify that Studio is correctly installed, try building a "hello world" program:
    % CC hello.cc -library=stlport4
    % ldd a.out | grep stlport
            libstlport.so.1 =>       /studio/install/directory/.../libstlport.so.1
    Various options can cause the static libstlport.a to be linked instead, accidentally or on purpose. If you still have a problem, please show the complete command line that you used to link the program. (You can abbreviate all the .o files as *.o, but show everything else.)

    One of the files that is installed with Studio lists the libraries that you can freely redistribute with your application. The name and location of that file varies with the version of Studio. For Studio 12.2, the file is
    LEGAL/OracleSolarisStudio12.2_DistributionREADME.txt
    All versions of Studio allow redistribution of the STLport library.

    For a discussion of best practices in shipping a shared library with your application, please see this series of articles:
    http://www.oracle.com/technetwork/articles/servers-storage-dev/linkinglibraries-396782.html
  • 2. Re: lack of libstlport4.so when ldd the program
    901538 Newbie
    Currently Being Moderated
    Hi,Steve:
    Thanks to your reply, and it really helps a lot.And now, our product requires a list of packages, which includes SUNWlibm,SUNWlibms,SUNWsprot,SUNWsprox,SUNWtoo,SUNWi1of,SUNWxwfnt, could you please tell me if the libstlport.so.1 is contained in any of these packages.
  • 3. Re: lack of libstlport4.so when ldd the program
    paul_floyd Newbie
    Currently Being Moderated
    Hi

    libstlport.so isn't included in a system package. The library that comes with Oracle Studio can be redistributed freely.

    Paul
  • 4. Re: lack of libstlport4.so when ldd the program
    Steve_Clamage Pro
    Currently Being Moderated
    More precisely, libstlport.so.1 is included in a package that is part of the compiler installation. You cannot redistribute those packages.

    You can redistribute the library file (not the package it comes in) as part of your application. The articles I referenced earlier explain exactly how to do that.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points