Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7888097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:45:01+00:00 2026-06-03T05:45:01+00:00

This works fine on Windows 7 with Python 2.7: lib = ctypes.cdll.LoadLibrary(‘prov_means’) provmeans =

  • 0

This works fine on Windows 7 with Python 2.7:

lib = ctypes.cdll.LoadLibrary('prov_means')
provmeans = lib.provmeans  

The library prov_means.DLL is in my working directory. It exports a simple, stand-alone C function provmeans() with no dependencies.

When I try the same thing on Windows XP and Python 2.7 I get

Traceback (most recent call last):
  File "D:\python\Auxil\src\auxil.py", line 130, in <module>
    lib = ctypes.cdll.LoadLibrary('prov_means')
  File "C:\Python27\lib\ctypes\__init__.py", line 431, in LoadLibrary
    return self._dlltype(name)
  File "C:\Python27\lib\ctypes\__init__.py", line 353, in __init__
    self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] The specified module could not be found 

I have tried copying the DLL to Windows\System32 and also entering the full path name

"d:\\python\\auxil\\src\\prov_means"

with and without the “.DLL” extension. Nothing works.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:45:02+00:00Added an answer on June 3, 2026 at 5:45 am

    Error 126 is what you get when a dependent DLL can not be found. There are two obvious causes for this:

    1. Your DLL is not being located.
    2. Your DLL depends on other DLLs that cannot be found.

    I doubt that option 1 is the problem but in any case I think I would probably be using a full path to that DLL to be sure.

    So that leaves option 2 and the most common cause for that is that your target machine does not have the C++ runtime installed. Either install the C++ runtime on your target machine, or use static linking, /MT, when building your DLL so that you do not need to redistribute the runtime.

    Probably, on the machine that you developed the DLL, you have installed a C++ compiler and that installed the runtime for you. On your target machine, where the code fails, you have not installed the compiler and so the runtime is not present.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Note: This problem occurs only on Mac, on Windows works fine. I have a
I'm using this script which works fine for a single lightbox popup window. I
This works fine: $.getJSON(http://localhost:59396/xxxWeb/ CarouselHandler.ashx?action=getproducts&ids= + ids, function(data) { carousel.size(allProductIDs.length); if (numberOfImagesLeftToShow < numberOfImagesToDisplay)
This works fine: GET /mvc/Movies/TitleIncludes/Lara%20Croft When I submit a request that contains a colon,
This works fine: [655971, 2343, 343].map(function(x) { return parseInt(x) }) // [655971, 2343, 343]
This works fine: TreeMap <String, ArrayList> x_probs_org = new TreeMap<String, ArrayList>(); But this: TreeMap
This works fine: var vm = {}; $.getJSON('file.json', function (data) { vm.objects = data;
I´m dynamically creating an instance of a class with reflection and this works fine,
At the end of a ggplot, this works fine: + opts(title = expression(Chart chart_title...))
We currently have a working php mail script, this works fine and as we

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.