[Mesa-dev] Building Mesa for Windows using Visual Studio
Emil Velikov
emil.l.velikov at gmail.com
Tue Apr 14 05:41:06 PDT 2015
Hi Shervin,
On 14 April 2015 at 00:22, Shervin Sharifi <shervin0 at gmail.com> wrote:
> Hi,
> I tried to use Mesa (compiled with MSVC) to run OpenGL ES content on
> Windows . I ran into a few problems.
> I don't know if this is the right way of reporting issues, but thought
> people may be interested to know.
>
Another thing would be to file a bug report, although most people
appreciate patches (send via git send-email) even more :-)
> Here's a piece of code in functions _mesa_dlopen(const char*, int) in
> src\mesa\main\dlopen.h (same problem happens with function _mesa_dlsym(void
> *, const char *) in the same file).
>
> The original code returns NULL and doesn't load the library if the code is
> compiled with Visual Studio.
>
True but is the library, that is to be opened, there in the first
place ? Last time I've looked nothing seriously bad was happening
(apart from the missing EXT_texture_compression_s3tc and
ANGLE_texture_compression_dxt extensions) when we fail to open the
dxtn library.
Cheers,
Emil
> #if defined(HAVE_DLOPEN)
> flags = RTLD_LAZY | RTLD_GLOBAL; /* Overriding flags at this time */
> return dlopen(libname, flags);
> #elif defined(__MINGW32__)
> return LoadLibraryA(libname);
> #else
> return NULL;
> #endif
>
> Adding the following lines to the code resolves the problem:
>
> #elif defined(_WIN32)
> return LoadLibraryA(libname);
>
> Thanks,
> Shervin
>
More information about the mesa-dev
mailing list