09-03-2013 09:02 AM
Hello,
I am trying to recompile a program that was last built using Labwindows /CVI 2009. The computer was re-imaged and Labwindows /CVI 2012 SP2 was installed. The .cws file was opened from the original code and I am able to compile for debug with no errors or warnings. However, as soon as I try to execute the debug build I get an error on the screen that reads something like:
FATAL RUNTIME ERROR: (Random code) The application failed to start because pthreadvc2.dll was not found. Re-installing the application may fix the problem.
I never saw this problem before the re-image. Any thoughts on how to fix this short or reinstalling CVI?
Additional system info: Window XP Pro, NI MAX 5.4, daqMX 9.7.5
Thanks,
Dave
09-04-2013 10:01 AM
When you are saying you never saw this problem before, you mean when you compile and executed the code in LabWindows/CVI 2009? or 2012?
Have you tried to reinstall CVI? Can you also try the run the code on another computer maybe with Win 7 OS?
09-04-2013 10:05 AM
I never saw this problem with the CVI 2009 compiled code. I was able to locate a copy of the DLL on a similar computer and place it in the folder with the .cws file to clear the issue. But is this a file that CVI should have installed as part of the package?
I have been trying to avoid reinstalling CVI as it is a rather lengthy process on this computer.
09-05-2013 09:20 AM
I have CVI installed on my computer, and I don't have that DLL. This link mentions that pthreadVC2.dll is a library file that contains malicious code. So while reimaging your computer this might have been deleted for some reason. This DLL doesn't get downloaded with CVI.
09-05-2013 03:17 PM
That DLL is associated with the POSIX threads library (pthreads). I've used it before when doing threading using MinGW. It's possible that your application is linking against the libraries for POSIX threads. This does work, but there is little reason to do so (that I can see) since CVI has its own multi-threading libraries that are easier to use. Another, more likely possibility is that some third party module or DLL that your application uses makes use of POSIX threads and when that module fails it brings down the application.
The website for POSIX threads is here, including prebuilt DLLs:
http://www.sourceware.org/pthreads-win32/
Dependency Walker is a useful utility that may help you track down what is looking for that DLL file:
http://www.dependencywalker.com/