question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

visual studio redistributable

See original GitHub issue

Currently, the windows version of glfw needs to have the VC redistributable installed or else it fails with an error when you attempt to use it. Would you be willing to redistribute the DLL inside the windows wheel?

For the x64 version this looks like copying msvcr110.dll from c:\windows\system32 to the package directory, then modifying this code: https://github.com/FlorianRhiem/pyGLFW/blob/master/glfw/library.py#L161 to look something like this:

elif sys.platform == 'win32':
    # try glfw3.dll using windows search paths
    try:
        glfw = ctypes.CDLL('glfw3.dll')
    except OSError:
        # try glfw3.dll in package directory
        try:
            glfw = ctypes.CDLL(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'glfw3.dll'))
        except OSError:
            # try glfw3.dll with included VC redistributable
            os.environ["PATH"] = os.environ["PATH"] + ";" + os.path.abspath(os.path.dirname(__file__))
            try:
                glfw = ctypes.CDLL('glfw3.dll')
            except OSError:
                glfw = None

It looks like you are explicitly allowed to redistribute the redistributable DLLs: https://docs.microsoft.com/en-us/cpp/windows/determining-which-dlls-to-redistribute?view=vs-2019

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
FlorianRhiemcommented, Dec 30, 2019

Thanks for your help! I’ve just uploaded v1.9.0 with wheels for linux, windows and macOS.

0reactions
christopherhessecommented, Dec 29, 2019

I tested this on a headless server and it seemed to work fine. I don’t have a desktop linux machine currently.

Thanks for doing this! Being able to depend on glfw without adding per-platform install instructions is great.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Latest supported Visual C++ Redistributable downloads
Microsoft Visual C++ Redistributable latest supported downloads · Visual Studio 2015, 2017, 2019, and 2022 · Visual Studio 2013 (VC++ 12.0).
Read more >
Download Visual C++ Redistributable for Visual Studio ...
The Visual C++ Redistributable Packages install run-time components that are ...
Read more >
Visual C++ Redistributable for Visual Studio 2015
The Visual C++ Redistributable Packages install run-time components that are required to run C++ applications built using Visual Studio 2015.
Read more >
Redistributing Visual C++ Files
The easiest way to locate the redistributable files is by using ...
Read more >
Visual Studio 2019 Redistribution
Find the Distributable Code for Microsoft Visual Studio ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found