OK
I added the following empty class in my program to eliminate the
link warning since references to this class is via pointers. It's
really acting like a void* ...
namespace v8 { namespace internal {
class Object {};
}}
On Jul 15, 10:06 pm, christy <[email protected]> wrote:
> I guess I was incorrect.
>
> As soon as I added m_handle.Dispose() in the destructor function the
> link warning error returns.
>
> On Jul 15, 9:49 pm, christy <[email protected]> wrote:
>
> > I think there is a bug in the v8 templates.
>
> > Here is what I originally defined...
>
> > template <class T>
> > class V8Handle
> > {
> > public:
> > V8Handle() {}
> > explicit V8Handle(T handle) : m_handle(handle) {}
> > virtual ~V8Handle() { m_handle.Dispose(); }
> > T Handle() { return m_handle; }
>
> > private:
> > T m_handle;
>
> > };
>
> > class V8ContextHandle : public V8Handle<v8::Persistent<v8::Context>>
> > {
> > public:
> > typedef V8ContextHandle* Ptr;
> > V8ContextHandle() : V8Handle(v8::Context::New()) {}
>
> > };
>
> > What I did to resolve this is problem was not to use the template and
> > to define the class outright like this ...
>
> > class V8ContextHandle
> > {
> > public:
> > typedef V8ContextHandle* Ptr;
> > V8ContextHandle() : m_handle(v8::Context::New()) { }
> > v8::Persistent<v8::Context> Handle() { return m_handle; }
>
> > private:
> > v8::Persistent<v8::Context> m_handle;
>
> > };
>
> > This compiles without the link warning. This leads me to believe that
> > there is a bug in the template definitions.
>
> > On Jul 15, 5:21 pm, christy <[email protected]> wrote:
>
> > > I'm getting the following link warning
>
> > > warning LNK4248: unresolved typeref token (0100001C) for
> > > 'v8.internal.Object'; image may not run
>
> > > I'm using Visual Studio 2010 so I don't know if this is a C++/CLI
> > > issue.
>
> > > I'm trying to create a managed library so I'm building this library to
> > > be a .dll
>
> > > I'm not sure why I'm getting this error and how to resolve this
> > > warning.
>
> > > Some guidance will be greatly appreciated.
>
> > > thx
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users