-3

This happens when P/Invoking into Intel IPP library. This library in-turn relies on OpenMP.

Here's what I've tried: ​http://software.intel.com/en-us/articles/opm-abort-initializing-libguide40dll/

Should resolve the exception about using two versions of OpenMP together (libguide40.dll and libiomp5md.dll). Removing a local copy of libguide40.dll did not solve the issue. Could you help me to track it down?

I am trying dir /s libguide40.dll: there is no more instances of that DLL, but I am still getting the exception.

Details: I am using P/Invoke generated code as provided by Intel in their samples for IPP.

GregC
  • 7,737
  • 2
  • 53
  • 67
  • Kind of hard to tell why you are getting that if one can't see how you are consuming the DLL – MethodMan Mar 18 '13 at 19:29
  • 1
    there is really no way anyone can help you with so little to go on. Have you double checked that the DLL is where you think it is? Have you double checked your path or whatever settings you believe control where the loader looks for the DLL? Are you hardcoding the name of or path to the DLL, or are you working them out in code? If it's in code, have you used the debugger to confirm you have it right? Etc – Kate Gregory Mar 18 '13 at 19:30
  • 1
    The link doesn't explain it, you are not linking anything. We can't tell if it is borken [DllImport] declaration, unusual to specify exports by ordinal, or that you've got a DLL Hell problem. Pointless to make us guess btw. – Hans Passant Mar 18 '13 at 20:29
  • 2
    The error is ERROR_INVALID_ORDINAL (and maybe followed by a number) You could try depends.exe and check the dll dependencies recursively. http://www.dependencywalker.com/ – Simon Mourier Mar 18 '13 at 20:54
  • DependencyWalker fails to launch my app. It insists that I have a x86 exe that uses x64 dlls. It simply isn't so. – GregC Mar 18 '13 at 21:23
  • 1
    StackOverflow has very scarce info on this kind of error, so I worked through this error, initially as a more and more detailed question, and then the answer. Hope this can be helpful to somebody someday. – GregC Mar 19 '13 at 13:38

1 Answers1

2
  1. The OpenMP DLL that I was using on target machine had incorrect number of bytes in it (probably a network file transfer SNAFU). The way to avoid this mess is to use an archive or MD5.

  2. It was still broken... I had to ensure that initialization of IPP runs only once for the whole application. I used a static Lazy member.

Thanks for all the help!

GregC
  • 7,737
  • 2
  • 53
  • 67
  • 1
    I had a similar issue and replacing Visual C++ 2008 Redistributable with its [SP1](http://www.microsoft.com/en-us/download/details.aspx?id=5582) resolved it. – Masood Khaari Nov 18 '13 at 12:09