find-sym attempts to figure out where one or more unresolved externals you are seeing lives. These errors are common when porting C code from one *ix to another.

It currently knows how to search in a variety of system libraries, and system header files.

Later, it may also be able to search an application.

find-sym has two main modes of operation:

  1. It can parse stdin for some "unresolved external" errors from gcc (See the "-p" flag).
  2. It can search for only a single symbol, specified on the command line (See the "-s" flag).

BTW, find-sym has been ported to Linux (RHEL 3 and Fedora Core 3), Solaris, AIX 5.1, IRIX, Tru64 and DragonFly BSD so far. If you know sh/ksh/bash scripting, you'll probably find it fairly simple to port. Just look for the case statements.

You can download it here.

To use find-sym:

  1. Download the program
  2. put it somewhere on your $PATH, EG $HOME/bin is probably on your $PATH. If it's not, you can add it by editing your ~/.bashrc or ~/.cshrc, depending on what shell you use.
  3. Make it executable:
  4. run "find-sym -s ldap_start_tls_s" (for example), or run find-sym with no arguments for usage - EG, parsing messages from gcc for unresolved externals
  5. The program will hopefully output some hints about what flags you can add to your compile or link
  6. The way that I've found most often works for adding such flags is to put them in your "$CC" variable prior to running ./configure, EG, when using sh/ksh/bash: ...or similar with setenv for csh/tcsh. You can do much the same thing if find-sym suggests a -I instead, as well. If you've already run ./configure, you may want to "rm config.cache" before running it again.



Hits: 3792
Timestamp: 2024-03-01 13:54:31 PST

Back to Dan's tech tidbits

You can e-mail the author with questions or comments: