|
From: Sam E. <em...@ya...> - 2009-02-23 18:16:01
|
Thanks for your help Karl. Besides adding _mglapi_get_context to mesa.def, I found that I also had to rename gl_dispatch_stub_*() to mgl_dispatch_stub_*() in wmesa.c and rename glu* to mglu* in glu.def ... I later noticed that glprocs.h has: #ifdef USE_MGL_NAMESPACE #define gl_dispatch_stub_343 mgl_dispatch_stub_343 #define gl_dispatch_stub_344 mgl_dispatch_stub_344 ... so perhaps I just needed to include glprocs.h somewhere rather than change wmesa.c. Anyway, I managed to build opengl32.dll and osmesa32.dll with USE_MGL_NAMESPACE defined, but am still not sure how to use both this Mesa opengl32.dll and the default opengl32.dll at the same time at runtime (eg. call mgl*() functions in one context and gl*() functions in another). Karl Schultz wrote: > > You probably have to change _glapi_get_context to _mglapi_get_context > in mesa.def. I guess the leading '_' was to blame. > > Here's how to solve the problem on your own: > > You're in VS8, right? > > Use "Find in Files" to find all occurrences of "glapi_get_context". > > It shows up in mesa.def. good > > In glapi.h, we see: > > #if defined(USE_MGL_NAMESPACE) > #define _glapi_set_dispatch _mglapi_set_dispatch > #define _glapi_get_dispatch _mglapi_get_dispatch > #define _glapi_set_context _mglapi_set_context > #define _glapi_get_context _mglapi_get_context > #define _glapi_Context _mglapi_Context > #define _glapi_Dispatch _mglapi_Dispatch > #endif > > Ah, it does get mangled, so the def file needs to export the mangled > symbol. > > Karl > > > On Thu, Feb 19, 2009 at 2:17 PM, Sam Eml <em...@ya...> wrote: >> >> Hi, >> >> I'm trying to build Mesa with mangled namespace in VC8 as described in >> the >> README.WIN32: I've specified the preprocessor flag USE_MGL_NAMESPACE in >> the >> project settings, and changed the gl* symbols to mgl* in mesa.def >> (drivers/windows/gdi/mesa.def). >> >> The mesa project of the solution builds ok, but the gdi project gives: >> >> error LNK2001: unresolved external symbol _glapi_get_context mesa.def >> fatal error LNK1120: 1 unresolved externals >> ...\Mesa-7.3\windows\VC8\mesa\Debug\OPENGL32.lib >> >> Would anyone have any ideas? >> >> -- >> View this message in context: >> http://www.nabble.com/link-error-with-USE_MGL_NAMESPACE-tp22109892p22109892.html >> Sent from the mesa3d-users mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------------ >> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, >> CA >> -OSBC tackles the biggest issue in open source: Open Sourcing the >> Enterprise >> -Strategies to boost innovation and cut costs with open source >> participation >> -Receive a $600 discount off the registration fee with the source code: >> SFAD >> http://p.sf.net/sfu/XcvMzF8H >> _______________________________________________ >> Mesa3d-users mailing list >> Mes...@li... >> https://lists.sourceforge.net/lists/listinfo/mesa3d-users >> > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, > CA > -OSBC tackles the biggest issue in open source: Open Sourcing the > Enterprise > -Strategies to boost innovation and cut costs with open source > participation > -Receive a $600 discount off the registration fee with the source code: > SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Mesa3d-users mailing list > Mes...@li... > https://lists.sourceforge.net/lists/listinfo/mesa3d-users > > -- View this message in context: http://www.nabble.com/link-error-with-USE_MGL_NAMESPACE-tp22109892p22166971.html Sent from the mesa3d-users mailing list archive at Nabble.com. |