Professional Web Applications Themes

where to put .so files ? - UNIX Programming

My application includes some .so libraries. Because I don't know where the users will install the app with those libs, I compiled them with the -R. flag ( there is a dot after R ) with the thinking that those libs will be looked for in the same directory with the app. The application will be started from a script file that will change the working directory to where it is installed first. For example: cd /some/directory/myappdir ../myapp Is it not a good thing to do ? Is it better to force the users to install the app in some ...

  1. #1

    Default where to put .so files ?

    My application includes some .so libraries. Because I don't know where the
    users will install the app with those libs, I compiled them with the -R.
    flag ( there is a dot after R ) with the thinking that those libs will be
    looked for in the same directory with the app. The application will be
    started from a script file that will change the working directory to where
    it is installed first. For example:

    cd /some/directory/myappdir
    ../myapp

    Is it not a good thing to do ? Is it better to force the users to install
    the app in some predefined directory like /usr/local/myappdir and lib files
    in /usr/local/myappdir/lib and then set the R option to that directory ?

    Thanks for your help,

    Vu




    Vu Guest

  2. #2

    Default Re: where to put .so files ?

    Vu Pham wrote: 

    Let the user install myappdir wherever they want. It's okay to insist
    on particular hierarchy within myappdir. So, you might have something
    like this in your makefile:

    # Change this line to install myapp somewhere else.
    PREFIX=/usr/local/myapp

    Then, you can use "-R$(PREFIX)/lib".

    Hth,
    Jeff

    Jeff Guest

  3. #3

    Default Re: where to put .so files ?


    "Jeff Schwab" <net> wrote in message
    news:com... [/ref]
    the [/ref]
    be [/ref]
    where [/ref]
    install [/ref]
    files 
    >
    > Let the user install myappdir wherever they want. It's okay to insist
    > on particular hierarchy within myappdir. So, you might have something
    > like this in your makefile:
    >
    > # Change this line to install myapp somewhere else.
    > PREFIX=/usr/local/myapp
    >
    > Then, you can use "-R$(PREFIX)/lib".[/ref]

    Thanks, Jeff.

    I forgot to say that this is not an open source app. I can support the
    customers only the binary files.


    Vu


    Vu Guest

  4. #4

    Default Re: where to put .so files ?

    "Vu Pham" <com> writes in comp.unix.programmer:
    |My application includes some .so libraries. Because I don't know where the
    |users will install the app with those libs, I compiled them with the -R.
    |flag ( there is a dot after R ) with the thinking that those libs will be
    |looked for in the same directory with the app.

    I believe that looks for them in the current directory, and it would be
    better to use $ORIGIN if you want them to be relative to the app itself.
    See the "Linker and Libraries Guide" on http://docs.sun.com/ for
    details.

    --
    __________________________________________________ ______________________
    Alan Coopersmith calberkeley.org
    http://www.CSUA.Berkeley.EDU/~alanc/ aka: COM
    Working for, but definitely not speaking for, Sun Microsystems, Inc.
    Alan Guest

  5. #5

    Default Re: where to put .so files ?


    "Alan Coopersmith" <calberkeley.org> wrote in message
    news:bsvd3c$31gp$berkeley.edu...
    [...] 
    Thanks, Alan. That book is interesting, although it is a little bit thick
    and it takes me this whole holiday to read it :-)

    Vu


    Vu Guest

Similar Threads

  1. Question problems copying or renaming files unlock delete files
    By anhgun123 in forum Brainstorming Area
    Replies: 1
    Last Post: February 27th, 11:34 AM
  2. Urgent: Online files accessing local files Issue
    By Gunjan Gupta in forum Macromedia Flash Player
    Replies: 3
    Last Post: June 7th, 08:49 PM
  3. Preserving links between Illustrator files and image files during system upgrade
    By M._Robert_Tyler@adobeforums.com in forum Adobe Illustrator Macintosh
    Replies: 2
    Last Post: June 5th, 02:27 AM
  4. Replies: 4
    Last Post: November 18th, 11:36 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139