VC + + DLL release to production environment process

Source: Internet
Author: User

The recent project used the VC + + DLL, in the local debugging without any problems, but released, copy to another machine on the error, said to find DLL, because of their own work contact this aspect is relatively small, after a toss, finally resolved, the following steps for the solution

One, the platform toolset ( eventually not selected after this release can also run, choose the VS V140), but the C + + related tools are necessary to install , chose Visual Studio 2015-windows XP (V140_XP),

Next build Project error, C:\Program Files (x86) \msbuild\microsoft.cpp\v4.0\v140\microsoft.cppcommon.targets (1407,5): Error MSB6006: "Rc.exe" has exited with code 5. After searching, it was found that C + + related tools were not installed, so find vs Installer, fix, as

Then wait long and the installation is complete.

II, VS C + + redistributable Package

The build succeeded, filled with joy to get the other machine to run, followed by a basin of cold water. Found unable to run, prompted to find the corresponding DLL, and after countless search for information, need two points, a release must be released to release, with the debug version is not possible (because it contains some of the machine specific debugging information), the second is the need for the target machine Install the C + + component package for the development environment , for example, I am using the C + + class library developed by VS2015, and the target environment machine will install the Microsoft Visual C + + 2015 Redistributable Package (x86). Attention to distinguish our target program is 32-bit or 64-bit, then also to install the corresponding redistributable package, the address of the package can be self-Baidu, Microsoft's official online, Baidu is the first one.

Third, the default optimization of C + + class library (this pit is also relatively large)

I defined two variables in the class library, but found that the variable value is empty after publishing, always find no reason, ask a friend, he told me is optimized out, then found the problem, immediately resolved,

The selection is disabled.

At this point, the problem is resolved, after the release, the program copy to the 03,WIN7,08 system can be used normally.

VC + + DLL release to production environment process

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.