This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have Visual Studio 2010 installed and have a c++ project( or Driver)which I got with my hardware which I can build successfully without any errors. I get a Wrapper.dll, which I would like to access using JNI in order to use with java as my whole application is in java. I am using Win7 64-bit.
Wrapper.dll of course is in the correct folder and it is a 32-bit dll and my Java program also uses a JRE with 32-bit, so this is not the cause of the error.
I used DependencyWalker to check whether *.dlls are missing: And I got these dll missing
And yes there are some missing. Can I conclude that the error is related with that these DLLs are missing? But why does Visual Studio compile correctly then and does not throw an error? How to solve this in order to access these functions in Wrapper.dll?
I also read that downloading dll's might not be the right thing to do! (I know that Wrapper.dll relies on another dll or sourcecode which was built in Visual Studio 2005, if that is of interest.)
I found out, that Wrapper.dll relies on three other dlls which probably were built on MSVS2005. These require the above mentioned DLL's (checked with dependencywalker) and I guess therefore Wrapper.dll also links them.
So what do I actually do to get rid of these old dll's? Would I need to build the other three DLLs with VS2010 or is this a problem which always will appear, meaning, that you need to copy paste old DLLs in order to use the precompiled Libraries which are dependent on those.
Is there a way, that the program would run on any other system as well without copy pasting these DLL's?
Is This A Good Question/Topic? 0
Can I conclude that the error is related with that these DLLs are missing?
Yes. Unfortunately the error message never tells you exactly which DLL is missing - it could be either that it cannot find the DLL you specified, or it cannot find a DLL upon which that DLl depends. You might be able to use Process Monitor from sysinternals to see which DLLs the JVM is attempting to open, and thus determine which one was missing.
But why does Visual Studio compile correctly then and does not throw an error?
That depends on a number of things. Andi t has a lot do do with what kind of DLLs they are (.NET, or plain C/C++). Usually, with C/C++ development, all you need is the header files and .lib file to make the compiler and linker happy. It's not until you run the app that you need to .dll file.
Essentially, you will need those DLLs unless you can modify Wrapper.dll to no longer rely on them.