S
Shea Martin
Solaris 9, Sun Workshop 5.0
I have ObjectA.o, ObjectB.o. ObjectA.o uses std::list.
I created a archive of the objects: ar cvr libAB.a *.o.
I have example.cc which I am trying to compile against ObjectA ObjectB.
1. CC -I. -o example.bin example.cc ./libAB.a
this fails, on link error to std::list.
2. CC -I. -o example.bin example.cc ObjectA.o ObjectB.o
this works.
Anyone know why method 2 works, and not method 1? I really need those
objects in the archive.
Thanks.
~Shea M.
ps - Not sure if this matters or not (other than the fact it is poor
design, but ObjectA and ObjectB reference one another.
I have ObjectA.o, ObjectB.o. ObjectA.o uses std::list.
I created a archive of the objects: ar cvr libAB.a *.o.
I have example.cc which I am trying to compile against ObjectA ObjectB.
1. CC -I. -o example.bin example.cc ./libAB.a
this fails, on link error to std::list.
2. CC -I. -o example.bin example.cc ObjectA.o ObjectB.o
this works.
Anyone know why method 2 works, and not method 1? I really need those
objects in the archive.
Thanks.
~Shea M.
ps - Not sure if this matters or not (other than the fact it is poor
design, but ObjectA and ObjectB reference one another.