Discussion:
Using udk and freestore (fs)
(too old to reply)
Alon Blayer-Gat
2003-12-18 13:01:10 UTC
Permalink
From other posts, your application is a bunch of .a archives pulled in
by one .cc main program.
The best approach is to compile all the source files that go into
the .a's with -Tauto (the default), and not either -Tlocal or -Tused.
Then do a CC -Tprelink_objects on all the .o's that are going into a
particular archive, before doing the "ar" command to create the archive.
Then compile the main program with the default -Tauto as well.
Then link.
If you take this approach, does it link correctly, with and without
using "fs"?> Jonathan SchillingHi,I recompiled all my libraries as you
suggested. and ran CC -Tprelink_objects *.o before 'ar'.When I arrived the
linkage phase I had to seperate compilation from linkage in order to
manipulate the .ti file.This is due to the following compiler
flag -DTEMPLATE_DECL=template<> . I had to change it
to -DTEMPLATE_DECL=template\<\> in the .ti file.Otherwise the shell/compiler
are confused.After that I managed to linke and recived the following
erros:Undefined first referencedsymbol in
fileTNYArray<T1>::size(void) const [with T1=unsigned char, return
type=unsigned int] tools.a(lang.o)TNYStack<T1>::TNYStack<long>(unsigned
int, const T1 &) [with T1=long]
adt.a(bitmap.o)TNYArray<T1>::TNYArray<AltSfe>(unsigned int, const T1 &)
[with T1=AltSfe]
ei-main.a(default_sfe_selector.o)get_target_number<T1>(const T1 *,
std::basic_string<char, std::char_traits<char>, std::allocator<char>> &)
[with T1=SeiSfeCancelShortMsgRequest, return type=bool]
ei-main.a(default_sfe_selector.o)get_uid_number<T1>(const T1 *,
SMIdentifierHandler *) [with T1=SeiSfeDbQueryRequest, return type=int]
ei-main.a(default_sfe_selector.o)GenieEi::processSfeEiRequest<T1>(Dialog *,
const T1 &) [with T1=SfeTeiSendShortMsgRequest, return type=int]
genie.a(genie_ei_int.o)TNYArray<T1>::~TNYArray<std::basic_string<char,
std::char_traits<char>, std::allocator<char>>>(void) [with
T1=std::basic_string<char, std::char_traits<char>, std::allocator<char>>]
tools.a(lang.o)NYHashIterator<T1,
T2>::NYHashIterator<std::basic_string<char, std::char_traits<char>,
std::allocator<char>>, TNYList<Suffix> *>(TNYHash<T1, T2> &) [with
T1=std::basic_string<char, std::char_traits<char>, std::allocator<char>>,
T2=TNYList<Suffix> *]
ei-main.a(default_sfe_selector.o)TNYArray<T1>::TNYArray<unsigned
char>(unsigned int, const T1 &) [with T1=unsigned char]
tools.a(lang.o)GenieEi::handle_sfe_statement<T1>(Dialog *, const T1 &) [with
T1=SfeCeiSendShortMsgAck, return type=int]
genie.a(genie_ei_int.o)TNYArray<T1>::TNYArray<long>(unsigned int, const T1
&) [with T1=long] adt.a(reginv.o)TNYList<SADesc>::__vtbl
api.a(special_attr.o)TNYArray<T1>::~TNYArray<AltSfe>(void) [with T1=AltSfe]
ei-main.a(default_sfe_selector.o)get_target_number<T1>(const T1 *,
std::basic_string<char, std::char_traits<char>, std::allocator<char>> &)
[with T1=CeiSfeSendShortMsgRequest, return type=bool]
ei-main.a(default_sfe_selector.o)GenieEi::processSfeEiRequest<T1>(Dialog *,
const T1 &) [with T1=SfeEiGetConfigRequest, return type=int]
genie.a(genie_ei_int.o)get_target_number<T1>(const T1 *,
std::basic_string<char, std::char_traits<char>, std::allocator<char>> &)
[with T1=SeiSfeDbQueryRequest, return type=bool]
ei-main.a(default_sfe_selector.o)TNYArray<T1>::operator [](unsigned int)
[with T1=std::basic_string<char, std::char_traits<char>,
std::allocator<char>>, return type=T1 &]
ei-main.a(default_sfe_selector.o)TNYArray<T1>::size(void) const [with
T1=std::basic_string<char, std::char_traits<char>, std::allocator<char>>,
return type=unsigned int]
ei-main.a(default_sfe_selector.o)get_source_number<T1>(const T1 *,
std::basic_string<char, std::char_traits<char>, std::allocator<char>> &)
[with T1=SeiSfeDbQueryRequest, return type=bool]
ei-main.a(default_sfe_selector.o)get_target_number<T1>(const T1 *,
std::basic_string<char, std::char_traits<char>, std::allocator<char>> &)
[with T1=TeiSfeNotifyAlertRequest, return type=bool]
ei-main.a(default_sfe_selector.o)get_trm_target_number<T1>(const T1 *,
std::basic_string<char, std::char_traits<char>, std::allocator<char>> &)
[with T1=SeiSfeCancelShortMsgRequest, return type=bool]
ei-main.a(default_sfe_selector.o)GenieEi::handle_sfe_statement<T1>(Dialog *,
const T1 &) [with T1=SfeEiNotifyTargetSMEState, return type=int]
genie.a(genie_ei_int.o)TNYArray<T1>::~TNYArray<unsigned char>(void) [with
T1=unsigned char] tools.a(lang.o)GenieEi::set_sched_ack<T1>(const
Dialog *) [with T1=EiSfeGetConfigAck, return type=T1 *]
genie.a(genie_ei_int.o)GenieEi::send_message<T1>(const GenieDialog *, const
T1 &) [with T1=SfeSeiSendShortMsgAck, return type=int]
genie.a(genie_ei_int.o)TNYList<T1>::discard(const T1 &) [with
T1=OstreamPtrListElem, return type=T1 *]
adt.a(mult_ostream.o)TNYStack<long>::__vtbl
adt.a(bitmap.o)global_rm_get_default_value<T1>(const std::basic_string<char,
std::char_traits<char>, std::allocator<char>> &, T1 &, const T1 &) [with
T1=short, return type=void]
ei-main.a(sfe_connection_manager.o)GenieEi::handle_sfe_statement<T1>(Dialog
*, const T1 &) [with T1=SfeSeiCancelShortMsgAck, return type=int]
genie.a(genie_ei_int.o)TNYHash<T1, T2>::insert(const T1 &, const T2 &) [with
T1=std::basic_string<char, std::char_traits<char>, std::allocator<char>>,
T2=TNYList<Suffix> *, return type=bool]
ei-main.a(default_sfe_selector.o)TNYArray<T1>::operator [](unsigned int)
const [with T1=unsigned char, return type=const T1 &]
tools.a(lang.o)get_source_number<T1>(const T1 *, std::basic_string<char,
std::char_traits<char>, std::allocator<char>> &) [with
T1=SeiSfeCancelShortMsgRequest, return type=bool]
ei-main.a(default_sfe_selector.o)get_trm_target_number<T1>(const T1 *,
std::basic_string<char, std::char_traits<char>, std::allocator<char>> &)
[with T1=EiSfeFinalStateRequest, return type=bool]
ei-main.a(default_sfe_selector.o)global_rm_get_default_value<T1>(const
std::basic_string<char, std::char_traits<char>, std::allocator<char>> &, T1
&, const T1 &) [with T1=std::basic_string<char, std::char_traits<char>,
std::allocator<char>>, return type=void]
ei-main.a(ei_implementation.o)GenieEi::set_sched_ack<T1>(const Dialog *)
[with T1=EiSfeNotifySMStateAck, return type=T1 *]
genie.a(genie_ei_int.o)get_target_number<T1>(const T1 *,
std::basic_string<char, std::char_traits<char>, std::allocator<char>> &)
[with T1=EiSfeNotifySMStateRequest, return type=bool]
ei-main.a(default_sfe_selector.o)TNYArray<T1>::operator ==(const
TNYArray<T1> &) const [with T1=unsigned char, return type=bool]
tools.a(lang.o)FreeStore::create_instance(Dispatcher &)
genie_ei.oGenieEi::handle_sfe_statement<T1>(Dialog *, const T1 &) [with
T1=SfeEiAbortRequest, return type=int]
genie.a(genie_ei_int.o)TNYArray<T1>::operator [](unsigned int) [with
T1=unsigned char, return type=T1 &] tools.a(lang.o)TNYArray<T1>::operator
[](unsigned int) [with T1=AltSfe, return type=T1 &]
ei-main.a(default_sfe_selector.o)TNYArray<T1>::operator [](unsigned int)
const [with T1=AltSfe, return type=const T1 &]
ei-main.a(default_sfe_selector.o)TNYHash<T1,
T2>::~TNYHash<std::basic_string<char, std::char_traits<char>,
std::allocator<char>>, TNYList<Suffix> *>(void) [with
T1=std::basic_string<char, std::char_traits<char>, std::allocator<char>>,
T2=TNYList<Suffix> *] ei-main.a(default_sfe_selector.o)TNYHash<T1,
T2>::TNYHash<std::basic_string<char, std::char_traits<char>,
std::allocator<char>>, TNYList<Suffix> *>(unsigned int (*)(const T1 &),
unsigned int, bool, bool, float, float) [with T1=std::basic_string<char,
std::char_traits<char>, std::allocator<char>>, T2=TNYList<Suffix> *, return
type=unsigned int]
ei-main.a(default_sfe_selector.o)TNYArray<T1>::~TNYArray<bool>(void) [with
T1=bool]
ei-main.a(sfe_connection_manager.o)GenieEi::set_sched_ack<T1>(const Dialog
*) [with T1=SeiSfeNotifyAlertAck, return type=T1 *]
genie.a(genie_ei_int.o)TNYList<OstreamPtrListElem>::__vtbl
adt.a(mult_ostream.o)get_trm_source_number<T1>(const T1 *,
std::basic_string<char, std::char_traits<char>, std::allocator<char>> &)
[with T1=SeiSfeCancelShortMsgRequest, return type=bool]
ei-main.a(default_sfe_selector.o)get_target_number<T1>(const T1 *,
std::basic_string<char, std::char_traits<char>, std::allocator<char>> &)
[with T1=EiSfeFinalStateRequest, return type=bool]
ei-main.a(default_sfe_selector.o)TNYList<UdhInfoElem>::__vtbl
ei-main.a(gsm_support.o)GenieEi::processSfeEiRequest<T1>(Dialog *, const T1
&) [with T1=SfeSupeiShortMsgData, return type=int]
genie.a(genie_ei_int.o)__T_::TNYList<UdhInfoElem>
ei-main.a(gsm_support.o)GenieEi::handle_sfe_statement<T1>(Dialog *, const T1
&) [with T1=SfeSeiDbQueryDebugAck, return type=int]
genie.a(genie_ei_int.o)global_rm_get<T1>(const std::basic_string<char,
std::char_traits<char>, std::allocator<char>> &, T1 &) [with T1=int, return
type=int] ei-main.a(default_sfe_selector.o)TNYList<SSAPoolDesc>::__vtbl
api.a(special_attr.o)TNYArray<T1>::TNYArray<std::basic_string<char,
std::char_traits<char>, std::allocator<char>>>(unsigned int, const T1 &)
[with T1=std::basic_string<char, std::char_traits<char>,
std::allocator<char>>]
ei-main.a(default_sfe_selector.o)get_source_number<T1>(const T1 *,
std::basic_string<char, std::char_traits<char>, std::allocator<char>> &)
[with T1=SeiSfeSendShortMsgRequest, return type=bool]
ei-main.a(default_sfe_selector.o)GenieEi::handle_sfe_statement<T1>(Dialog *,
const T1 &) [with T1=SfeEiNotifyBlockedRequest, return type=int]
genie.a(genie_ei_int.o)GenieEi::processSfeEiRequest<T1>(Dialog *, const T1
&) [with T1=SfeSeiNotifyAlertRequest, return type=int]
genie.a(genie_ei_int.o)get_target_number<T1>(const T1 *,
std::basic_string<char, std::char_traits<char>, std::allocator<char>> &)
[with T1=SeiSfeSendShortMsgRequest, return type=bool]
ei-main.a(default_sfe_selector.o)TNYStack<T1>::push(const T1 &) [with
T1=long, return type=int]
adt.a(bitmap.o)GenieEi::handle_sfe_statement<T1>(Dialog *, const T1 &) [with
T1=SfeCtlGetConfigAck, return type=int]
genie.a(genie_ei_int.o)GenieEi::processSfeEiRequest<T1>(Dialog *, const T1
&) [with T1=SfeGeiSendShortMsgRequest, return type=int]
genie.a(genie_ei_int.o)TNYHash<T1, T2>::find(const T1 &, T2 &) const [with
T1=std::basic_string<char, std::char_traits<char>, std::allocator<char>>,
T2=TNYList<Suffix> *, return type=bool]
ei-main.a(default_sfe_selector.o)get_trm_source_number<T1>(const T1 *,
std::basic_string<char, std::char_traits<char>, std::allocator<char>> &)
[with T1=SeiSfeSendShortMsgRequest, return type=bool]
ei-main.a(default_sfe_selector.o)TNYArray<T1>::operator [](unsigned int)
[with T1=bool, return type=T1 &]
ei-main.a(sfe_connection_manager.o)TNYList<Message>::__vtbl
comm.a(msg_queue.o)get_trm_source_number<T1>(const T1 *,
std::basic_string<char, std::char_traits<char>, std::allocator<char>> &)
[with T1=EiSfeFinalStateRequest, return type=bool]
ei-main.a(default_sfe_selector.o)get_source_number<T1>(const T1 *,
std::basic_string<char, std::char_traits<char>, std::allocator<char>> &)
[with T1=EiSfeFinalStateRequest, return type=bool]
ei-main.a(default_sfe_selector.o)GenieEi::processSfeEiRequest<T1>(Dialog *,
const T1 &) [with T1=SfeEiNotifySMState, return type=int]
genie.a(genie_ei_int.o)TNYArray<T1>::operator [](unsigned int) [with
T1=long, return type=T1 &] adt.a(reginv.o)TNYList<T1>::discard(const T1 &)
[with T1=UdhInfoElem, return type=T1 *]
ei-main.a(gsm_support.o)global_rm_get<T1>(const std::basic_string<char,
std::char_traits<char>, std::allocator<char>> &, T1 &) [with
T1=std::basic_string<char, std::char_traits<char>, std::allocator<char>>,
return type=int] ei-main.a(default_sfe_selector.o)NYHashIterator<T1,
T2>::get_next_hashobj(T1 &, T2 &) [with T1=std::basic_string<char,
std::char_traits<char>, std::allocator<char>>, T2=TNYList<Suffix> *, return
type=NYHashIteratorEnum::rc_t]
ei-main.a(default_sfe_selector.o)TNYList<Suffix>::__vtbl
ei-main.a(default_sfe_selector.o)GenieEi::handle_sfe_statement<T1>(Dialog *,
const T1 &) [with T1=SfeSeiSendShortMsgAck, return type=int]
genie.a(genie_ei_int.o)get_uid_number<T1>(const T1 *, SMIdentifierHandler *)
[with T1=SfeUidDialogStmt, return type=int]
genie.a(genie_sfe_selector.o)get_trm_target_number<T1>(const T1 *,
std::basic_string<char, std::char_traits<char>, std::allocator<char>> &)
[with T1=SeiSfeSendShortMsgRequest, return type=bool]
ei-main.a(default_sfe_selector.o)TNYArray<T1>::TNYArray<bool>(unsigned int,
const T1 &) [with T1=bool]
ei-main.a(sfe_connection_manager.o)GenieEi::processSfeEiRequest<T1>(Dialog
*, const T1 &) [with T1=SfeEiNotifySMStateRequest, return type=int]
genie.a(genie_ei_int.o)GenieEi::set_sched_ack<T1>(const Dialog *) [with
T1=SupeiSfeShortMsgDataAck, return type=T1 *]
genie.a(genie_ei_int.o)TNYStack<T1>::pop(T1 &) [with T1=long, return
type=int] adt.a(bitmap.o)GenieEi::set_sched_ack<T1>(const Dialog *)
[with T1=TeiSfeSendShortMsgAck, return type=T1 *]
genie.a(genie_ei_int.o)global_rm_get_default_value<T1>(const
std::basic_string<char, std::char_traits<char>, std::allocator<char>> &, T1
&, const T1 &) [with T1=int, return type=void]
ei-main.a(default_sfe_selector.o)get_uid_number<T1>(const T1 *,
SMIdentifierHandler *) [with T1=SeiSfeCancelShortMsgRequest, return
type=int] ei-main.a(default_sfe_selector.o)TNYArray<T1>::operator
[](unsigned int) const [with T1=bool, return type=const T1 &]
ei-main.a(default_sfe_selector.o)TNYList<T1>::find(const T1 &) const [with
T1=UdhInfoElem, return type=T1 *]
ei-main.a(gsm_support.o)TNYList<Dialog>::__vtbl
ei-main.a(sfe_connector.o)TNYArray<T1>::~TNYArray<long>(void) [with T1=long]
adt.a(reginv.o)GenieEi::handle_sfe_statement<T1>(Dialog *, const T1 &) [with
T1=SfeSeiDbQueryAck, return type=int] genie.a(genie_ei_int.o)
J. L. Schilling
2003-12-19 14:40:12 UTC
Permalink
Post by Alon Blayer-Gat
When I arrived the
linkage phase I had to seperate compilation from linkage in order to
manipulate the .ti file.This is due to the following compiler
flag -DTEMPLATE_DECL=template<> . I had to change it
to -DTEMPLATE_DECL=template\<\> in the .ti file.Otherwise the shell/compiler
are confused.
This is a known problem that was corrected in I believe UnixWare 7.1.2
(Open UNIX 8.0.0). The escapes are now added by the compiler when it
generates the .ti file, so no need for you to do it:

$ CC -DTEMPLATE_DECL="template<>" test5.cpp test5b.cpp
test5.cpp:
test5b.cpp:
prelink: INFO: C++ prelinker: executing: CC -c
-DTEMPLATE_DECL=template\<\> test5.cpp

Jonathan Schilling
Alon Blayer-Gat
2003-12-23 11:58:17 UTC
Permalink
I'm using UW 7.1.1 with UDK 8
I complile with -DTEMPLATE_DECL=template\<\>
But still it is inserted to the .ti file as -DTEMPLATE_DECL=template<>
Thus prelinking does not pass.
double quots, -DFLAGS=\"hello\" for example are inserted with the
backslash, this is OK.
Post by J. L. Schilling
Post by Alon Blayer-Gat
When I arrived the
linkage phase I had to seperate compilation from linkage in order to
manipulate the .ti file.This is due to the following compiler
flag -DTEMPLATE_DECL=template<> . I had to change it
to -DTEMPLATE_DECL=template\<\> in the .ti file.Otherwise the shell/compiler
are confused.
This is a known problem that was corrected in I believe UnixWare 7.1.2
(Open UNIX 8.0.0). The escapes are now added by the compiler when it
$ CC -DTEMPLATE_DECL="template<>" test5.cpp test5b.cpp
prelink: INFO: C++ prelinker: executing: CC -c
-DTEMPLATE_DECL=template\<\> test5.cpp
Jonathan Schilling
J. L. Schilling
2003-12-19 14:50:45 UTC
Permalink
From other posts, your application is a bunch of .a archives pulled in
by one .cc main program.
The best approach is to compile all the source files that go into
the .a's with -Tauto (the default), and not either -Tlocal or -Tused.
Then do a CC -Tprelink_objects on all the .o's that are going into a
particular archive, before doing the "ar" command to create the archive.
Then compile the main program with the default -Tauto as well.
Then link.
If you take this approach, does it link correctly, with and without
using "fs"?>
Hi,I recompiled all my libraries as you
suggested. and ran CC -Tprelink_objects *.o before 'ar'.When I arrived the
linkage phase I had to seperate compilation from linkage in order to
manipulate the .ti file. [...]
After that I managed to linke and recived the following
erros:Undefined first referencedsymbol in
fileTNYArray<T1>::size(void) const [with T1=unsigned char, return
type=unsigned int] tools.a(lang.o)TNYStack<T1>::TNYStack<long>(unsigned
int, const T1 &) [with T1=long] [......]
Your posting lost all its line breaks, which makes it hard to get
much from.

But just to verify, this is the approach you should have taken:

$ CC -c a.cpp b.cpp c.cpp
$ CC -Tprelink_objects a.o b.o c.o
$ ar rv libone.a a.o b.o c.o

$ CC -c d.cpp e.cpp f.cpp
$ CC -Tprelink_objects d.o e.o f.o
$ ar rv libtwo.a d.o e.o f.o

$ CC -c main.cpp

$ CC -L. main.o -lone -ltwo

If you follow this scheme and still get unresolved references or
missing template instantiations, analyze what's missing. Is it
a use from one .o to another .o within a .a, or is it a use
across a .a, or what?

Jonathan Schilling
Alon Blayer-Gat
2003-12-23 11:49:52 UTC
Permalink
Hi,

I have rechecked, I was doing it like you suggested.
The unresolved references or missing template instantiations are
always from other libraries.
That is it's of .o files which reside in different libraries.

Regards,
Alon Blayer-Gat
Post by J. L. Schilling
From other posts, your application is a bunch of .a archives pulled in
by one .cc main program.
The best approach is to compile all the source files that go into
the .a's with -Tauto (the default), and not either -Tlocal or -Tused.
Then do a CC -Tprelink_objects on all the .o's that are going into a
particular archive, before doing the "ar" command to create the archive.
Then compile the main program with the default -Tauto as well.
Then link.
If you take this approach, does it link correctly, with and without
using "fs"?>
Hi,I recompiled all my libraries as you
suggested. and ran CC -Tprelink_objects *.o before 'ar'.When I arrived the
linkage phase I had to seperate compilation from linkage in order to
manipulate the .ti file. [...]
After that I managed to linke and recived the following
erros:Undefined first referencedsymbol in
fileTNYArray<T1>::size(void) const [with T1=unsigned char, return
type=unsigned int] tools.a(lang.o)TNYStack<T1>::TNYStack<long>(unsigned
int, const T1 &) [with T1=long] [......]
Your posting lost all its line breaks, which makes it hard to get
much from.
$ CC -c a.cpp b.cpp c.cpp
$ CC -Tprelink_objects a.o b.o c.o
$ ar rv libone.a a.o b.o c.o
$ CC -c d.cpp e.cpp f.cpp
$ CC -Tprelink_objects d.o e.o f.o
$ ar rv libtwo.a d.o e.o f.o
$ CC -c main.cpp
$ CC -L. main.o -lone -ltwo
If you follow this scheme and still get unresolved references or
missing template instantiations, analyze what's missing. Is it
a use from one .o to another .o within a .a, or is it a use
across a .a, or what?
Jonathan Schilling
J. L. Schilling
2004-01-02 19:18:30 UTC
Permalink
Post by Alon Blayer-Gat
I have rechecked, I was doing it like you suggested.
The unresolved references or missing template instantiations are
always from other libraries.
That is it's of .o files which reside in different libraries.
Given the structure of the symbols and instantiations involved,
see if you can reproduce the problem using a relatively small amount
of code. (I know, often easier said than done.)

Also, look at your template definition scheme. Anywhere that
an instantiation needs to be done, the relevant template definition
must be available. So for example if archive A needs an instantiation
of template T, but the definition of T only exists within archive B,
you might have a problem.

Jonathan Schilling

Alon Blayer-Gat
2003-12-23 16:30:40 UTC
Permalink
I compiled and linked as follows:

CC -Tauto -c one.cpp -o one.o
CC -Tauto -c two.cpp -o two.o
CC -Tprelink_objects one.o two.o
ar rv libthree.a one.o two.o

CC -Tauto -c main.cpp -o main.o
escape <,> characters with \ in .ti file
CC -L. main.o -llibthree

Alon Blayer-Gat
Post by J. L. Schilling
From other posts, your application is a bunch of .a archives pulled in
by one .cc main program.
The best approach is to compile all the source files that go into
the .a's with -Tauto (the default), and not either -Tlocal or -Tused.
Then do a CC -Tprelink_objects on all the .o's that are going into a
particular archive, before doing the "ar" command to create the archive.
Then compile the main program with the default -Tauto as well.
Then link.
If you take this approach, does it link correctly, with and without
using "fs"?>
Hi,I recompiled all my libraries as you
suggested. and ran CC -Tprelink_objects *.o before 'ar'.When I arrived the
linkage phase I had to seperate compilation from linkage in order to
manipulate the .ti file. [...]
After that I managed to linke and recived the following
erros:Undefined first referencedsymbol in
fileTNYArray<T1>::size(void) const [with T1=unsigned char, return
type=unsigned int] tools.a(lang.o)TNYStack<T1>::TNYStack<long>(unsigned
int, const T1 &) [with T1=long] [......]
Your posting lost all its line breaks, which makes it hard to get
much from.
$ CC -c a.cpp b.cpp c.cpp
$ CC -Tprelink_objects a.o b.o c.o
$ ar rv libone.a a.o b.o c.o
$ CC -c d.cpp e.cpp f.cpp
$ CC -Tprelink_objects d.o e.o f.o
$ ar rv libtwo.a d.o e.o f.o
$ CC -c main.cpp
$ CC -L. main.o -lone -ltwo
If you follow this scheme and still get unresolved references or
missing template instantiations, analyze what's missing. Is it
a use from one .o to another .o within a .a, or is it a use
across a .a, or what?
Jonathan Schilling
Loading...