[vtkusers] Compile VTK+QT for release
Alex Southern
mrapsouthern at gmail.com
Tue Dec 13 08:00:31 EST 2011
Hi,
Yes i copied them. I got it working now though, I shall summarize what I
did but it by no means a proper guide as i'm unsure of the various
combinations that people may encounter. But heres what worked for me....
Compile a Release version of your code e.g. myApp.exe
Download Dependency Walker (DW) (free) http://www.dependencywalker.com/
Copy all DW files into the Release folder with your myApp.exe.
Open a cmd.exe window.
In the command window navigate to your Release folder.
At the prompt type, depend myApp.exe
A DW window will open. In the top left COLLAPSE all tree branches apart
from the root myApp.exe. This shows what dll's are required with your
application.
All those beginning with QT should be noted. (I presume those of you
using dynamic vtk libraries (as opposed to static) will have those
listed here as well)
Start a new project in Visual Studio -> Other Project Types -> Setup and
Development ->Visual Studio installer -> Setup Project.
Add your EXE: Project -> Add -> File -> myApp.exe
Add each QT and VTK DLL listed in DW: Project -> Add -> File -> *.dll
Add the Visual Studio dependencies required on target machine without
installing Visual Studio. NOTE I compiled in 64 bits on Visual Studio
2010 - so you should choose the module name corresponding to your setup
for me it was.
Project -> Add -> Merge Module -> Microsoft_VC100_CRT_x64.msm
I believe this step avoids the requirement to install a redistributable
package on the users machine.
Now change the TargetPlatform property to x64 if myApp.exe is a 64 bit
application.
Now Build Solution in Release mode.
The two files in the Deployment projects Release folder are all you need
to distribute the application to you work colleagues.
Cheers
Alex
On 12/13/2011 2:18 PM, John Drescher wrote:
>> I installed vcredist_x64.exe on my friends computer, the installation
>> worked. But when he runs my application the error message is still the same.
>> Could not start correctly.
>>
>> Has anyone else come across this problem before now?
>>
> Have you copied the Qt dlls?
>
> John
More information about the vtkusers
mailing list