[messages] [Developers] Re: Roadmap for VASSAL 4

Joel Uckelman uckelman at nomic.net
Mon May 16 07:29:02 MST 2011


Thus spake lancel:
> I don't know how to read the dump unless I have the symbol files
> generated with the code compiled.  So, I tried to set up your code in a
> MS IDE to see if that can be compiled.  On my first run, the IDE
> generated the following errors for your function pointer translation
> lines inside setup_gl_fptrs().
> 
> error C2440: '=' : cannot convert from 'void (__stdcall
> *)(GLenum,GLuint)' to 'void (__cdecl *)(GLenum,GLuint)'
> 1>          This conversion requires a reinterpret_cast, a C-style cast
> or function-style cast

That's interesting. This is a problem with the function calling
convention. Apparently VS wants __stdcall. I'm not sure why this doesn't
happen for me. I'll mess with this a bit to see what's going on. Maybe
the solution here is a macro defining the right calling convention for
these. 
 
> So, I tried to cast your lines in glutil.h and glutil.cpp to something
> like this:
> 
> extern void (__stdcall *BlendFunc)(GLenum sfactor, GLenum dfactor);
> 
> The thing compiled but the link failed with something like the ones
> below.  I have yet to figure out why only the lines below have
> unresolved external symbols but not all the function pointers that you
> redefined inside setup_gl_fptrs().  Maybe it is a different problem
> unrelated to the changes I made.
> 
> glutil.obj : error LNK2001: unresolved external symbol
> __imp____glewGenBuffersARB
> 1>glutil.obj : error LNK2001: unresolved external symbol
> __imp____glewDeleteBuffersARB
> 1>glutil.obj : error LNK2001: unresolved external symbol
> __imp____glewBufferDataARB
> 1>glutil.obj : error LNK2001: unresolved external symbol
> __imp____glewBindBufferARB
> 1>glutil.obj : error LNK2001: unresolved external symbol
> __imp____glewGenBuffers
> 1>glutil.obj : error LNK2001: unresolved external symbol
> __imp____glewDeleteBuffers
> 1>glutil.obj : error LNK2001: unresolved external symbol
> __imp____glewBufferData
> 1>glutil.obj : error LNK2001: unresolved external symbol
> __imp____glewBindBuffer
> 1>glutil.obj : error LNK2001: unresolved external symbol
> __imp____GLEW_VERSION_1_5
> 1>glutil.obj : error LNK2001: unresolved external symbol
> __imp____GLEW_EXT_texture_filter_anisotropic

It looks like the linker can't find GLEW. I don't know where you tell
the linker where to look for libraries in VS.

The last two, in particular, are just bools, not function pointers.

-- 
J.


More information about the messages mailing list