Library failed to load 'dll' in LabVIEW - labview

I want to use this project face_eye_detection.zip.
When I run it I get an error 'library failed to load',
So I changed the dll link
but the problem remains the same, I even change the dll link and it doesn't work.
Where exactly is the problem? In the link above, the program worked well with the others

Double check that it is a c++ dll and not a dotnet dll, that one has got me before.

Related

How to use ZeroBrane Studio IDE debugger when lua is compiled as c++

I have compiled Lua 5.3 as a 32 bit c++ DLL and exe. The DLL contains all the lua code except for lua.cpp and luac.cpp. The exe compiles lua.cpp and uses the DLL to run the lua interpreter. This works fine when running on its own from the command line. I wish to be able to run from the IDE using this DLL and exe.
If I replace /ZeroBraneStudio/bin/lua53.dll and lua53.exe with my own versions, I can run scripts (clicking the two green arrows). However, debugging does not work, giving the following error:
The procedure entry point luaL_addlstring could not be located in the dynamic link library lua53.dll.
I can see that this is happening because the debugger is making use of luasocket. \ZeroBraneStudio\bin\clibs53\socket\core.dll is dependent on lua53.dll, and is expecting it to contain lua compiled as c.
So, what is the correct solution to this - is it to compile luasocket as c++ as well?
(And, if so, does anybody have instructions/guidance for doing so? I have been unable to find anything on this.)
Thanks.
I'm not sure how exactly the DLL was compiled, but the error message likely indicates that the luaL_addlstring and other functions are not exported by it. If the symbols are exported correctly, you should be able to load luasocket and get the debugging working. See this thread for the related discussion.
Also, you don't need to replace lua53 library and executable, as you can configure the IDE to use your own copy of it using path.lua53 configuration setting as described in the documentation.
Okay, I was able to get it working. The solution was to compile luasocket as c++. I won't give full instructions on how to do this here, but some points to hopefully help anybody else with the same issue:
Got luasocket from here: https://github.com/diegonehab/luasocket
Renamed all *.c files to *.cpp
Renamed Lua52.props to Lua.props (I am using lua 5.3 but seems like it is compatible?)
Placed lua headers and lib in appropriate folders
Opened solution in Visual Studio 2012
Fixed up minor issues with project files, like the renaming of the files.
Added 'extern "C"' to declaration of luaopen_socket_core and luaopen_mime_core functions (necessary for lua to be able to load libraries).
Built solution
Copied new dlls into clibs53/socket and clibs53/mime folders.
I used Dependency Walker to help with this. If anybody wants further details in the future please leave a comment.

regsvr32 Custom ocx file not Registering

I've been asked to install an old VB program on an XP computer, but when I do I get an error when I run the program saying that Component 'filename.ocx' or one of its dependencies is not correctly registered: a file is missing or invalid.
This is a custom file (I did not create it), I have tried regsvr32 and I get no error messages but no successfully registered messages either.
This program also runs on another computer which this ocx file is not registered but opens without error. So my question would be what could cause the file to not be recognized by regsvr32, and run on another client with the same os, but without error. Any ideas, or new paths to look into would be very helpful.
Also if you dislike something about this question, let me know what it is, so I can fix it in the future. Down voting a question gives me no insight on why this upsets the community, it just discourages me to want to help others in areas I do understand.
If you do get the error "Component 'filename.ocx' or one of its dependencies is not correctly registered: a file is missing or invalid" from a custom dll or ocx file, it may just need that file and its dependent files in the directory that your running the executable, as was the problem in my case.
After adding the file to the root directory, and not registering any files the program opened fine. Maybe this helps someone else.

Use function of DLL in VBScript

I want to use a function of my Encryption.dll in my VBScript.
If I try to register the dll with regsvr32 /i Encryption.dll I get the error that the dll is loaded, but he can't register the file because there is no DllRegistryServer-Entrypoint.
So I tried another way as I read in a forum:
Set yourClass = CreateObject("Encryption.Hashing")
There I'm getting a ActiveX error.
Anymore ideas of what I can do?
Sounds like maybe the DLL was compiled improperly? Do you have the source? If not, try something like Telerik's JustDecompile and see if it can decompile it. This is not the end all be all kind of test but if it's a .NET dll, you should be able to decompile it. If it's a native DLL, there should be an error.
Without knowing that, there's several reasons you could be having problems.
Try creating a wrapper that exports the functions you need; test it in VS and then build it and try installing it again. Oh, one more thing. Native Libs have a .lib file that usually comes with the DLL if it's meant to be linked to for invoking purposes. That .lib and it's corresponding header files will be what you need to write a wrapper. Cheers.

Mono mac packager doesn't work with gdiplus.dll

I am making a desktop app with MonoMac that relies on system.drawing. This works fine within MonoDevelop, but the created .app package doesn't.
I get this exception:
System.DllNotFoundException: gdiplus.dll
Now, there are many references to this particular problem around the web, one of the more recent ones here: http://bugzilla.xamarin.com/show_bug.cgi?id=3263.
However, I have been unable to get it working. I can copy libgdiplus.dll.dylib from the lib folder into the MonoBundle folder of my app which gets me a bit further. Setting MONO_LOG_LEVEL to debug now tells me this:
Mono: DllImport error loading library 'dlopen([app]/Contents/MonoBundle/libgdiplus.dll.dylib, 9): Library not loaded: /Library/Frameworks/Mono.framework/Versions/2.10.9/lib/libglib-2.0.0.dylib
Referenced from: [app]/Contents/MonoBundle/libgdiplus.dll.dylib
Reason: image not found'.
I've copied libglib-2.0.0*.dylib in there as well. This doesn't help because it's searching in the Library/Frameworks/... folder. I've tried to add a dllmap entry both to the config file in the MonoBundle folder, as well as in a libgdiplus.dll.dylib.config file (and libgdiplus.dll.config). These seem to be ignored because I keep getting that same error.
Where do I go from here?
I'd probably suggest switching to using MonoMac.CoreGraphics instead of System.Drawing as the best solution. WinForms APIs weren't really considered for MonoMac apps (other than System.Drawing.Color and System.Drawing.RectangleF, and SizeF).
Could you submit a bug report about this to http://bugzilla.xamarin.com? Either I or Sebastien will need to look into ways to solve this problem in the long-term. I can't promise how long you might have to wait for a solution, though, so you really should consider using CoreGraphics.

Microsoft Visual Studio: How to find where a dll is loaded from?

A wrong version of a dll (MSVCR90d.dll instead of MSVCR90.dll) gets used for the delete operator, causing a crash. In the callstack, only the dll name is shown, not their path. How to see the path?
Edit: I'm building in Release mode, not in debug mode. So why does the debug dll get used? I have seen the same problem reported on many other websites, but could find no working solution.
Yesterday I found using Dependency Walker that the debug dll is getting picked up, so I renamed the dll, then the release version got picked up in the Dependency Walker, and also my program did not crash. I didn't change anything today, but the program has started crashing again. And when I see the dependency walker tree, it shows MSVCR90d.dll (the debug dll) with a question mark, saying it couldn't find it in the path. Why can't it pick up the release dll? Also I don't know from where the debug dll gets used by the runtime.
You can add them in your global PATH environment variable. Refer here
You can specify the dll manually by right clicking on the solution and selecting Add Reference, then browse to the particular dll.
You can add the path to the DLLs to the Executables files settings under Tools > Options > Projects and Solutions > VC++ Directories
For finding out the details of a dll, you might want to use DependencyWalker
However, in your case I think d is being appended to the name of dll, probably because you are creating a DEBUG build, and for that corresponding DEBUG versions of all dlls are loaded.
If you choose to create a RELEASE build, you would not have a d appended to MSVCR90.dll
You don't need to know Dll path, you need to understand why Debug version of delete operator is called. Maybe, _DEBUG constant is defined in Release configuration.