link: targets and specify {SimpleLinkList} as the tag in each list. {SimpleLinkList} is a variable specifying a minimal set of libraries that most applications require:
library JustAViewLib {
source:
MyView.C
link:
{SimpleLinkList} // Minimal set
}
binary JustAView {
source:
Main.C
link:
JustAViewLib // The JustAView library created above
{SimpleLinkList} // Minimal set
}
Makeit lists errors for undefined symbols encountered when MakeSharedLib executes. In the messages, look for errors like these below the MakeSharedLib command line:
... 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 ld: 0711-317 ERROR: Undefined symbol: TTEmplateClass<TClass>::MemberFunction()
The last line in the listing is an example of what can occur if you are using class templates and trying to reduce the size of your compiled code. For information about eliminating this type of error, see "Reduced compiled code size" on page 70.
To find the library files in which these symbols are defined, use
Once your build gets past
Using FindSymbols
FindSymbols. (The first time you run FindSymbols, it parses all library files and builds a database file so that subsequent lookups execute quickly.) To perform a lookup, run FindSymbols and specify the symbol exactly as it appears in the error listing. The symbol name must be enclosed in single quotes (`).HighLevelAlbert. Add that name as the tag in the library's link: target. To look for multiple symbols at once, include each as a separate argument on the 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. (The example needed only HighLevelAlbert.)
Even if you look up every symbol in the list, you probably won't find enough to build completely, because the libraries might also require other libraries. When you build library JustAViewLib {
source:
MyView.C
link:
HighLevelAlbert // Add
LowLevelAlbert // Add
NewGraphicApplicationLib // Add
{SimpleLinkList}
}
binary JustAView {
source:
Main.C
link:
{SimpleLinkList}
}JustAView again, you get these errors:
... MakeSharedLib ...
ld: 0711-317 ERROR: Undefined symbol: __vtt5TView
ld: 0711-317 ERROR: Undefined symbol: .TView::GetClassMetaInformation()
ld: 0711-317 ERROR: Undefined symbol: .TEventSenderSurrogate::GetClassMetaInformation()
Repeat the lookup and *.PinkMake modification until MakeSharedLib doesn't return an error.MakeSharedLib without error, you will probably find MakeSharedApp producing similar errors:
Use ... MakeSharedLib ...
... MakeSharedApp ...
ld: 0711-317 ERROR: Undefined symbol: TView::virtual-fn-table-ptr-table
ld: 0711-317 ERROR: Undefined symbol: .TView::GetClassMetaInformation()
ld: 0711-317 ERROR: Undefined symbol: .TEventSenderSurrogate::GetClassMetaInformation()
ld: 0711-317 ERROR: Undefined symbol: .TInputDevice::GetClassMetaInformation()
ld: 0711-317 ERROR: Undefined symbol: .TViewRoot::~TViewRoot()
ld: 0711-317 ERROR: Undefined symbol: .TViewRoot::TViewRoot(TRequestProcessor*)
ld: 0711-317 ERROR: Undefined symbol: .TViewRoot::AdoptChild(TView*)
FindSymbols again, but this time, add the link: tags to the binary target.
Repeat the process until library JustAViewLib {
source:
MyView.C
link:
ViewSystemLib
InputLib
HighLevelAlbert
LowLevelAlbert
NewGraphicApplicationLib
{SimpleLinkList}
}
binary JustAView {
source:
Main.C
link:
ViewSystemLib
InputLib
JustAViewLib
{SimpleLinkList}
}Makeit completes the build.
[Contents]
[Previous]
[Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.