Note that there are some explanatory texts on larger screens.

plurals
  1. POliboauth not being linked correctly
    primarykey
    data
    text
    <p>I am trying to add the liboauth.dylib to my xcode project (c++). I have configured and made the library, which is now sitting in my <code>/usr/local/lib</code> which now has: </p> <pre><code> liboauth.0.dylib liboauth.dylib &lt;- a link to liboauth.0.dylib liboauth.li liboauth.a </code></pre> <p>with the header in <code>usr/local/include</code>. Seems fine.</p> <p>I have included this in my xcode by adding the path <code>/usr/local/lib/liboauth.dylib</code> to the <code>Other Linker Flags</code> section, and <code>usr/local/include/</code> to the <code>Header Search Paths</code>.</p> <p>I have also included the same in the <code>Library Search Paths</code>.</p> <p>This builds fine on my system. However if I take the resulting .app to another (osx) computer it gives the error the <code>/usr/local/liboauth.0.dylib</code> (I get this by opening the .app and running the unix executable).</p> <p>Shouldn't the linker have included the liboauth dylib when built? And then it shouldn't be a problem when going to a different computer?</p> <p>If the answer is no, then how would I go about included the liboauth.dylib into the .app, so it can run on any computer (running osx)? </p> <p>Here is the specific error:</p> <pre><code>Library not loaded: /usr/local/lib/liboauth.0.dylib Referenced from: /Users/scratch/gameTest.app/Contents/MacOS/gameTest Reason: image not found </code></pre> <p><strong>Edit:</strong> I have found the problem! Using the otool -l command on the liboauth.0.dylib I found this:</p> <pre><code>Load command 3 cmd LC_ID_DYLIB cmdsize 56 name /usr/local/lib/liboauth.0.dylib (offset 24) time stamp 1 Thu Jan 1 12:00:01 1970 current version 9.1.0 compatibility version 9.0.0 </code></pre> <p>Can someone help me to figure out how to change this? I think it has something to do with the install_name_tool but I do not know how to go about it properly.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload