FindSymbols reports the shared libraries that contain the specified symbols.
Syntax
FindSymbols [ -match_substrings ] [ 'symbol' ... ]
| Arguments | -match_substrings |
Enables substring searches, a very slow operation. By default, FindSymbols searches by exact match.
|
| 'symbol' | The mangled, demangled, or mixed-form symbol to locate. The argument must be enclosed in single quotes ('). |
Use
The first time you run
NOTE
Because the implementation of an inline must be compiled with the header, you should be able to find the inline declaration if you do enough searching: it will be hidden either down near the bottom of the header or in another file that is an
A compiler is free to not inline an inline if doing so would generate worse code. This means that some symbols declared inline might not actually be inlined, and they can wind up compiled into and exported from a library which, if not in the
Typically you will use
To look for multiple symbols at once, include each as a separate argument on the
It's also possible to find symbols before using
With practice, you can use this technique well, and can even find other kinds of symbols (
Use this technique when you have a program that is already compiled and working, and you are adding new functionality to it. Then you have a good idea of what new symbols you've introduced, and what symbols to search for.
Usage
FindSymbols when MakeSharedLib or MakeSharedApp reports unresolved symbols, and you want to know which libraries you should add to the link list in your *.PinkMake file.FindSymbols, it builds a cache file: $TaligentExports/_AllSymbols. Subsequent runs consult that cache file. To rebuild or update the file, delete it and rerun FindSymbols. When you install a new build, InterimInstall should delete the cache.
If FindSymbols can't locate a symbol that you are certain exists, the symbol is probably an inline. There is no way to find inlines, because they are compiled into client code, as opposed to being compiled into and exported from a library for use by clients.#include in the header (typically similar to "XXXXImp.[ih]").*.PinkMake's link list, would lead to an unresolved symbol error. Examples
FindSymbols to locate the library that caused an "Undefined symbol" error when your build fails. For example, Makeit might list errors for undefined symbols encountered when MakeSharedLib executes. In the messages, look for errors like these below the MakeSharedLib command line:
To find the library files in which these symbols are defined, run ... MakeSharedLib -o JustAViewLib ...
ld: 0711-317 ERROR: Undefined symbol: .TGArea::~TGArea()
ld: 0711-317 ERROR: Undefined symbol: .TRGBColor::~TRGBColor()
ld: 0711-317 ERROR: Undefined symbol: .TGRect::~TGRect()
ld: 0711-317 ERROR: Undefined symbol: __vtt12TContentView
FindSymbols and specify the symbol exactly as it appears in the error listing. The symbol name must be enclosed within single quotes (`).HighLevelAlbert.FindSymbols command line:
TRGBColor::~TRGBColor():
LowLevelAlbert
TGRect::~TGRect():
CommonAlbert
HighLevelAlbert
__vtt12TContentView:
NewGraphicApplicationLib
This is the unique set of libraries identified:
CommonAlbert
HighLevelAlbert
LowLevelAlbert
NewGraphicApplicationLib
Notice that TGRect::~TGRect(): appears in CommonAlbert and HighLevelAlbert. When you get multiple libraries, you probably need to include only one. Try one, and if you still get errors for the symbol, try the other. In a worst case, include both. This example needed only HighLevelAlbert.Makeit. To do so, you must take a symbol from C++ code and put it into the canonical form used by the linker. This isn't easy. Here are some rules for functions that work 80 to 90% of the time:
For example:
const keywords inside a function's argument-parenthesis.
const keyword.
becomes: class TSomeClass {
int SomeFunc( const TSomeType* someArg,
TOtherType& otherArg ) const;
}
Complications creep in when one or more of the types involved are TSomeClass::SomeFunc(const TSomeType*,TOtherType&) const
#defines or typedefs. In such cases, it's better to choose a different function.enums, for example). This may seem like a lot of work, but at least you don't have to keep running the linker.
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Generated with WebMaker