Berkeley CSUA MOTD:Entry 33714
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/24 [General] UID:1000 Activity:popular
5/24    

2004/9/23 [Computer/SW/OS/OsX] UID:33714 Activity:moderate
9/23    One of the grad students I work with added a piece of code to one
        of our programs that need to be dynamically linked to.  He uses a
        mac, and he only wrote the linking flags for the mac, and stuck
        that in the makefile.  So our standard linux version no longer
        works.  He then left for Rome.  How should this look in ELF?
        ifeq "$(MACOSX)" "true"
        HomophoneName           := Homophone$(DirSuffix)
        LocalLinkLibFlags       += -F$(MacOSXLibraryDir) -framework
        $(HomophoneName)
        endif
        \_ -F and -framework set the linker to use the framework
        (aka shared library) in $(HomophoneName), so you need to add
        the ELF shared library to your link line, so that'd most likely
        be  -l$(HomophoneName) in your case, but I can't tell without
        more information. --twohey