É uma variável de ambiente e, como tal, é normalmente definida no Terminal por
export DYLD_LIBRARY_PATH=someValue
man dyld diz:
DYLD_LIBRARY_PATHThis is a colon separated list of directories that contain libraries. The dynamic linker searches these directories before it searches the default locations for libraries. It allows you to test new versions of existing libraries.
For each library that a program uses, the dynamic linker looks for it in each directory in
DYLD_LIBRARY_PATHin turn. If it still can't find the library, it then searchesDYLD_FALLBACK_FRAMEWORK_PATHandDYLD_FALLBACK_LIBRARY_PATHin turn.Use the
-Loption tootool(1). to discover the frameworks and shared libraries that the executable is linked against.
Você provavelmente desejaria algo como
export DYLD_LIBRARY_PATH=.:$DYLD_LIBRARY_PATH
para preceder . (diretório atual) à lista de locais pesquisados. No meu OS X não modificado, DYLD_LIBRARY_PATH não tem valor atual:
$ echo $DYLD_LIBRARY_PATH
$
Dependendo de como você pretende executar seu programa, é necessário definir isso de forma diferente, por exemplo, no Xcode (eu não sei onde).