How do executables on Linux know where to get data files?
        Posted  
        
            by Jeffrey Aylesworth
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Jeffrey Aylesworth
        
        
        
        Published on 2010-03-15T01:48:37Z
        Indexed on 
            2010/03/15
            1:59 UTC
        
        
        Read the original article
        Hit count: 325
        
Programs on Linux install data for programs into $PREFIX/share/programname, how does the program know where that is, does it need to be compiled in?
Would it be suitable to assume that the binary is in $PREFIX/bin, and use that to determine $PREFIX?
This only needs to work on Linux, and specifically, I am using C.
© Stack Overflow or respective owner