title: swi prolog standalone executable for mac not working as expected
body: <p>I am trying to create a prolog stand alone executable following the minimalistic example shown at <a href="http://www.swi-prolog.org/FAQ/UnixExe.html" rel="nofollow noreferrer">http://www.swi-prolog.org/FAQ/UnixExe.html</a>.</p>
  
  <p>Everything seems to work fine, however if I try to execute on a different mac that does not have swi-prolog installed I get the following error:</p>
  
  <p><code>dyld: Library not loaded: /usr/local/Cellar/swi-prolog/7.2.3_2/libexec/lib/swipl-7.2.3/lib/x86_64-darwin15.6.0/libswipl.dylib
  </code></p>
  
  <p>The command I run and its output:</p>
  
  <pre><code>pl_test|⇒ swipl --goal=hello --stand_alone=true -o hello -c hello.pl
  
  
  % autoloading prolog_codewalk:must_be/2 from /usr/local/Cellar/swi-prolog/7.2.3_2/libexec/lib/swipl-7.2.3/library/error
  % autoloading qsave:current_foreign_library/2 from /usr/local/Cellar/swi-prolog/7.2.3_2/libexec/lib/swipl-7.2.3/library/shlib
  % autoloading error:assertion/1 from /usr/local/Cellar/swi-prolog/7.2.3_2/libexec/lib/swipl-7.2.3/library/debug
  % autoloading prolog_codewalk:portray_clause/1 from /usr/local/Cellar/swi-prolog/7.2.3_2/libexec/lib/swipl-7.2.3/library/listing
  % autoloading prolog_codewalk:clause_info/4 from /usr/local/Cellar/swi-prolog/7.2.3_2/libexec/lib/swipl-7.2.3/library/prolog_clause
  % autoloading prolog_codewalk:initialization_layout/4 from /usr/local/Cellar/swi-prolog/7.2.3_2/libexec/lib/swipl-7.2.3/library/prolog_clause
  % autoloading prolog_source:directory_file_path/3 from /usr/local/Cellar/swi-prolog/7.2.3_2/libexec/lib/swipl-7.2.3/library/filesex
  % autoloading files_ex:use_foreign_library/2 from /usr/local/Cellar/swi-prolog/7.2.3_2/libexec/lib/swipl-7.2.3/library/shlib
  % autoloading record:member/2 from /usr/local/Cellar/swi-prolog/7.2.3_2/libexec/lib/swipl-7.2.3/library/lists
  % autoloading files_ex:maplist/2 from /usr/local/Cellar/swi-prolog/7.2.3_2/libexec/lib/swipl-7.2.3/library/apply
  % autoloading files_ex:permission_error/3 from /usr/local/Cellar/swi-prolog/7.2.3_2/libexec/lib/swipl-7.2.3/library/error
  % autoloading oset:reverse/2 from /usr/local/Cellar/swi-prolog/7.2.3_2/libexec/lib/swipl-7.2.3/library/lists
  % autoloading prolog_debug:backtrace/1 from /usr/local/Cellar/swi-prolog/7.2.3_2/libexec/lib/swipl-7.2.3/library/prolog_stack
  % autoloading prolog_codewalk:clause_name/2 from /usr/local/Cellar/swi-prolog/7.2.3_2/libexec/lib/swipl-7.2.3/library/prolog_clause
  % Autoloader: iteration 1 resolved 11 predicates and loaded 14 files in 0.101 seconds.  Restarting ...
  % Autoloader: loaded 11 files in 2 iterations in 0.143 seconds
  </code></pre>
  
  <p>hello.pl is identical with the example provided on the website (see link above)</p>
  
  <p>So the question is what am I missing?</p>