I ran a build using the /P flag that expands Marcos and displays the
preprocessed output.  I couldn't find a class definition for
v8::internal::Object but there is a forward definition of
v8::internal::Object.  This is why the compiler is complaining.  I saw
an older v8.h header file where void** was being used in placed where
v8::internal::Object** is now being used.  What would the class
definition look like? Can this be added to v8.h?

thx

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

Reply via email to