Linda wrote:
> Hi,
> 
> I use FLTK 1.1.7 and OpenGL to write my programs. I compile the code with
> Microsoft Visual Studio 2005 under Windows Vista Home Basic. Everything
> goes well on my computer. But when I copy the .exe files to other
> Windows computers and try to run the .exe files, I always get the
> error message “The setup of the program is wrong. Maybe reinstall
> the program can fix the problem�.
> 
> I guess that may be because other computers do not have
> FLTK 1.1.7 on them. I need to do something more than just
> copying my .exe files to other computers. But I do not know
> what to do. Could anyone give me some advices? Thank you very much!

        It could be the usual 'dll hell' where you either have to
        copy over the fltk*dll files into the same dir where your exe
        is located.

        Normally one statically links in the fltk binaries
        to avoid having to pass around DLLs, eg. fltk.lib instead of fltk.dll.

        BUT, since you're using the newer compiler, this may also
        be the 'new improved hell' that comes with "manifests" in
        Visual Studio 2005:
        
        http://msdn2.microsoft.com/en-us/library/ms235299(VS.80).aspx
        http://msdn2.microsoft.com/en-us/library/ms235316(VS.80).aspx

        An excerpt from the latter:

* * *
Manifest required

It is not supported to redistribute C/C++ applications that are built
without a manifest. Visual C++ libraries cannot be used by C/C++
applications without a manifest binding the application to these
libraries. All C/C++ binaries built in Visual C++ 2005 have to include
a manifest describing their dependencies on Visual C++ libraries. This
is the default setup of projects in Visual Studio and the default behavior
of the linker building the final binary from object code.

It is recommended in all cases that the manifest be internal.
However, in the case of an EXE file, the manifest can be external
(this scenario is supported but not recommended).

Applications that expect dependent DLLs to be present in either the
application-local folder or in a folder indicated by an environment
variable may also be vulnerable to security-related exploits. It is
also more difficult to service such applications after they have
been deployed.
* * *

        Manifests are these new things that ensure DLLs (such as the
        C++ runtime libs) are where they're supposed to be, and not
        something a hacker can drop in a writable directory somewhere
        so that they can use your software to invoke their hacked DLL's.
        Manifests somehow ensure such security loopholes are closed.

        I found this page the most useful, 'How to deploy with XCOPY':
        http://msdn2.microsoft.com/en-us/library/ms235291(VS.80).aspx

        ..since it describes what files need to be where, and talks about
        the wacky vcredist_x86.exe program that may need to be run on
        the target machine to get the binaries to run at all.

        I found this all to be a real mess, and reverted to an older
        compiler that doesn't have the manifest requirements for distributing
        binaries to other people.
_______________________________________________
fltk-opengl mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-opengl

Reply via email to