Editing
Software Development Platforms
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Working with Objects and Libaries=== Here are some useful commands that generally work on Linux or OS-X. To check what type a certain file is, use the <tt>file</tt> command. For example $ file libvtkmyUnsorted.so libvtkmyUnsorted.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped Notice that we get a lot of information about this object. On systems with both 32 bit and 64 bit objects (such as OS-X) this can be particularly useful to see how this was compiled. To list the symbols in an <tt>.o</tt> or <tt>.so</tt> or <tt>.a</tt> file, use <tt>nm</tt>. This can be useful to see if a particular function is available in a particular object or library. There can be a lot of output from this command, so typically you might dump the output into a file and then search that file using your preferred text editor. To find out which shared libraries an executable or library will want to load at run time, use <tt>ldd</tt>. (On OS-X, a similar tool is <tt>otool -L</tt>.) For example $ ldd faim_d linux-vdso.so.1 => (0x00007fff077aa000) libcgiter.so => not found liblapack.so.3gf => /usr/lib/atlas/liblapack.so.3gf (0x00007f4b7a295000) libpthread.so.0 => /lib/libpthread.so.0 (0x00007f4b7a079000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f4b79d6c000) libgfortran.so.3 => /usr/lib/libgfortran.so.3 (0x00007f4b79a90000) libm.so.6 => /lib/libm.so.6 (0x00007f4b7980b000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f4b795f3000) libc.so.6 => /lib/libc.so.6 (0x00007f4b79281000) libblas.so.3gf => /usr/lib/atlas/libblas.so.3gf (0x00007f4b788c4000) /lib64/ld-linux-x86-64.so.2 (0x00007f4b7ad80000) Notice that in this example it is telling us that <tt>faim_d</tt> will need to load libcgiter.so, but that it can't be found. We can fix this by adding the path to libcgiter.so to LD_LIBRARY_PATH (or on OS-X, to DYLD_LIBRARY_PATH). [[Image:Redirect.jpg|15px]] [[#top|''Return to Contents'']] or [[Main_Page|''Return to Main Page'']]
Summary:
Please note that all contributions to bone.wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BoneWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
associated-pages
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Documents
Recent changes
Help
Tools
What links here
Related changes
Page information