Re: [info-performer] ;-< 3rd attempt: silly Performer/STL question

New Message Reply Date view Thread view Subject view Author view

From: Bram Stolk (b.stolk++at++chello.nl)
Date: 04/10/2003 13:04:10


On Thu, 10 Apr 2003 10:16:52 -0700
Michael Logan <mlogan++at++arc.nasa.gov> wrote:

> I know its really bad to do this:
>
> vector<pfNode> nodelist;
>
> without using the STL allocator mentioned in this group, but

Indeed, this would never work, because there is no pfNode default
constructor. And this is because it is an abstract base class.
I would even avoid std::vector<pfGroup> because you never know
when pfGroups are instantiated by the vector, maybe even before
pfInit.

> this is ok, right?
>
> vector< pfNode* > nodeptrlist; Anytime I try this in a class, for

Yes, much better.

> example:
>
> class A {
> private:
> vector< pfNode* > nodeptrlist;
> (etc)
> };
>
> then later in the .C
>
> nodeptrlist.push_back( pf_node_ptr ); // its a pfNode*
>
>
> I get this link error..
>
> ld32: ERROR 33 : Unresolved text symbol
> "std::vector<pfNode*,std::allocator<pfNode*>
> >::_M_insert_aux(pfNode**,pfNode *const&)"
> -- 1st referenced by ../lib/libNelGeometry.a(NelGeometryPf.o).

This is probably because you did not compile using -O.
Some inlining is not performed without -O
If -O does not help, try -O2

  Bram

 
> any help??
>
> mike
>
> --
> Michael Logan Task Lead, Visual Cueing & Simulation, (650)-604-4494
> QSS Group, Inc. / NASA Ames Research Center
> MS 262-6,Moffett Field,CA, 94035
> private: vonlogan++at++rcn.com, http://users.rcn.com/vonlogan/index.htm
>
>
> -----------------------------------------------------------------------
> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
> -----------------------------------------------------------------------
>


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Apr 10 2003 - 13:08:25 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.