From: Alexandre Naaman (naaman++at++laplace.engr.sgi.com)
Date: 09/03/2004 08:52:42
Hi Dennis,
> I am developing a MFC-application with MS Visual Studio.Net and Performer
> (latest version 3.1.1.).
> I want to use a pfvMousePicker for picking. I included the
> "Performer/pfv/pfvMousePicker.h" and linked the libpfv.lib (actually all
> other pf libs as well). At the moment I use the mousepicker only in two
> lines of code:
>
> pfuMouse* pm = m_pPicker->getMouse();
> pfvInteractor* pia = m_pPicker->pick();
>
> Where m_pPicker is of Type pfvMousePicker*
> When I build he reports an linker error LNK2019, where he complains about an
> unresolved external symbol "[...]__declspec(dllimport) public: class
> pfvInteractor * __thiscall pfvMousePicker::pick(void)"
> (__imp_?pick++at++pfvMousePicker++at++++at++QAEPAVpfvInteractor++at++++at++XZ)', [...]"
>
> Strange that he doesent dislike the line above, that member function is
> defined in the same header file.
>
> If anyone could give me a hint, that would be great, i have no idea what the
> problem is.
>
At first glance it looks like pfvMousePicker::pick() simply isn't
implemented!!! I didn't find an implementation for it anywhere in the
source but to be honest that baffles me because I fail to see how libpfv
would work otherwise.
Maybe you could just add the following to your code:
pfvInteractor* pfvMousePicker::pick() { return ::pick(); }
but then you'll need to deal with the dllexport/dllimport issues ... which
_might_ be fixable if you did:
#define __BUILD_PFV__ 1
#include <Performer/pfv/pfvMousePicker.h>
followed by the code above, and place that into an additional .cpp file
that you link in with your program. It's messy but may act as a
work-around. In the meanwhile I'll file a bug on the matter.
Another option is to see if you can just use the pfvPicker::pick() method
directly. The pick() method (should be, but isn't) virtual so you may be
able to do something like:
((pfvPicker *)m_pPicker)->pick();
which is a much simpler way to work around the problem and I think should
work...
A+,
Alex.
This archive was generated by hypermail 2b29 : Fri Sep 03 2004 - 08:54:06 PDT