From: Allan Schaffer (allan++at++sgi.com)
Date: 06/16/2003 13:34:03
Hi Pete,
Pete Woodward Woodward wrote:
> I'm having problems linking for my basic performer
> application.Basically there are unresolved references to standard
> pfCalls. Not all, only some are not found...???
> .../mainwin.cpp:71: undefined reference to `pfNewPWin(pfPipe *)'
> .../mainwin.cpp:74: undefined reference to `pfNewChan(pfPipe *)'
> // create pipe window and associate it with the pipe
> pfPipeWindow *pwin = pfNewPWin(pipe)
> c++ -DHAVE_CONFIG_H -I. -I. -I.. -O2 -O0 -g3 -Wall -DI386 -DLinux
> -DHAVE_POSIX -I/usr/include/CC -I/usr/include -I/usr/include/g++
> -fno-exceptions -fno-check-new -c mainwin.cpp
I've made this mistake a few times as well, it appears that you're using
the C++ compiler but using Performer's C bindings in your code. Since
we have both C and C++ bindings in the same DSO there's some #define's
you need to set if you want to switch to the "other" [as compared to
your compiler].
/*
* When compiling with C++, the following options are available:
*
* Default -> use C++ API/types
* #define PF_C_API 1 -> augment C++ API with C API
* #define PF_CPLUSPLUS_API 0 -> do not use C++ API/types
*/
So perhaps it's simplest to just add -DPF_CPLUSPLUS_API=0 to your
compile line.
Enjoy,
Allan
-- Allan Schaffer allan++at++sgi.com Engr. Manager, Core Rendering 1-650-933-2160 Silicon Graphics http://www.sgi.com
This archive was generated by hypermail 2b29 : Mon Jun 16 2003 - 13:32:09 PDT