Re: Using pfChannel as a base-class

New Message Reply Date view Thread view Subject view Author view

Jan Barglowski (jan++at++euryale.chinalake.navy.mil)
Thu, 10 Apr 1997 08:51:50 -0700 (PDT)


R. Krijnen 0278, 3J03, 2-4 wrote:
> In my Performer application I have the need for a visChannal class
> which is derived from the pfChannel class. This worked fine on our SGI
> systems running Performer 2.01 and CC 4.0 compiler. Now I'm trying to
> port the application to our new Onyx2 iR which has Performer 2.1
> installed. Besides the new warnings generated by the new compiler (CC
> v7.1) I get a linker error telling me I have got an unresolved on the
> protected pfChannel method pf_copyToDraw??! The code below gives you a
> example of how did it.
>
>
> visChannel : public pfChannel {
> public:
> visChannel (pfPipe* pipe) : pfChannel (pipe)
> { }
>
> bool configure();
> };
>
> _.
> VisChannel* ch =new TvisChannel (pipe);
> _.
> ch->configure();
> _
> ch->setViewpoint (xyz, hpr);
> _
>
>
> My link line looks like:
> CC -g -32 complex.C -L/usr/lib -L/lib -lm -all -lpfdu_ogl -lpfui
> -lpfutil_ogl -lpf_ogl -none -limage -lfm -lGLU -lGL -lXext -lXsgivc
> -lXmu -lX11 -lfpe -lm -lC -lpfflt_ogl -o complex
>
> ld: ERROR 33: Unresolved text symbol "pfChannel::pf_copyToDraw(const
> pfUpdatable *)" -- 1st referenced by complex.o
>
>
> Development environment:
> Onyx2 iR (running Irix 6.4)
> Performer 2.1
> Irix CC 7.1 compiler
> Using old 32 bit style because of third party lib's
>
> Any suggestions?!
> I really don't want to rewrite my application.

I subclass pfChannel and it works fine on my iR. Here's my stuff
for comparison:

---
class otwChannel : public pfChannel {
private:
  int           on;
  Camera        *camera, *alt_cam;
  int           alt_set;

public: otwChannel(pfPipe *); void setCamera(pfCoord *, CAM_TYPE, pfCoord *); void setAltCam(pfCoord *, CAM_TYPE, pfCoord *); void update(void);

};

---
-> All pfChannel methods work fine, so I won't bother listing them...
---
Link line:
  CC -O2 -o otw main.o  otw.o  scene.o  part.o  io.o  ump_otw.o  ump_hud.o  ump_nawc.o  ump_alt.o  file.o  camera.o  channel.o  hud.o  rungs.o  filter.o  trail.o -L/usr/lib  -L/usr/lib/Performer/Static  -L/usr/lib/libpfdb  -L/usr/local/MultiGen/Performer_Loader_2.X  -L/lib  -lpf_ogl -lpfdu_ogl -lpfui -lpfutil_ogl -lpfflt_ogl -limage  -lGLU -lGL -lXext  -lfpe  -lXmu  -lX11  -lm  -lbsdump  -lC
---
Development environment:
- IRIX 6.2
- Performer 2.1
- C++ compiler 6.2
- old 32-bit compile for same reason as you :-(
---

There are a few differences, such as the compiler version and some C++ style diffs. Since I have no experience with the newer compiler I don't have anything I can add. Hope this gives you some more ideas!

jan

-- 
Jan Anthony Barglowski	              jan++at++chinalake.navy.mil
Real-time Computer Graphics           http://www1.ridgecrest.ca.us/~jan
Naval Air Warfare Center, China Lake  (619) 927-1057
=======================================================================
List Archives, FAQ, FTP:  http://www.sgi.com/Technology/Performer/
            Submissions:  info-performer++at++sgi.com
        Admin. requests:  info-performer-request++at++sgi.com

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:02 PDT

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