|
From: Sam E. <em...@ya...> - 2009-02-19 21:17:15
|
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. |
|
From: Karl S. <kar...@gm...> - 2009-02-21 15:37:18
|
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 > |
|
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. |
|
From: tom f. <tf...@al...> - 2009-02-23 19:31:43
|
Sam Eml <em...@ya...> writes:
[snip]
> 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).
I am currently working on getting exactly this [1] to work in GLEW, so
I would recommend going down that route.
First, though, I recommend you build MesaOpenGL32.dll when
USE_MGL_NAMESPACE is defined. This will allow you to link both OpenGL
and mangled Mesa in the same program.
I only care about this on Linux, but it would be a neat feature-bullet
if it worked on Windows (and Mac, for that matter). If you would be
interested in collaborating, please contact me off-list.
Best,
-tom
[1] Sort of. I only care about one context per process, but I don't
know which until I've gone through some runtime initialization.
> 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-tp22109892p2210989
> 2.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_N
> AMESPACE-tp22109892p22166971.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
|
|
From: Sam E. <em...@ya...> - 2009-02-23 20:31:45
|
Thanks so much for your suggestions Tom. I was only trying out Mesa/OSMesa in a very quick test last week (exploring various rendering solutions), so don't know yet if we'll really be working with it. tom fogal-3 wrote: > > [snip] > First, though, I recommend you build MesaOpenGL32.dll when > USE_MGL_NAMESPACE is defined. This will allow you to link both OpenGL > and mangled Mesa in the same program. > > I only care about this on Linux, but it would be a neat feature-bullet > if it worked on Windows (and Mac, for that matter). If you would be > interested in collaborating, please contact me off-list. > > Best, > > -tom > > [1] Sort of. I only care about one context per process, but I don't > know which until I've gone through some runtime initialization. > >> 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-tp22109892p2210989 >> 2.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_N >> AMESPACE-tp22109892p22166971.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-tp22109892p22169488.html Sent from the mesa3d-users mailing list archive at Nabble.com. |