WxWidgets program Link error Solution

Source: Internet
Author: User
Tags wxwidgets

 

Happy shrimp

Http://blog.csdn.net/lights_joy/

Lights@hb165.com

 

 

This article applies

WxWidgets- 2.8.8

Vs2008

Windows XP

 

 

Reprinted, but keep the author information

 

An error occurs when compiling the samples that comes with wxWidgets:

Cvtres: Fatal error cvt1100: duplicate resource. Type: manifest, name: 1, language: 0x0409

Because it is a manifest error, the first thing that comes to mind is to disable the option for generating the manifest file for this exe. This can solve the Link error but cause an error during running, the system prompts you to use manifest.

Open the RC file of this EXE project and check out the following two simple statements:

Mondrian icon "Mondrian. ICO"

# Include "wx/MSW/wx. RC"

It is estimated that the problem lies in Wx. Rc. I opened it and found several lines of code at the bottom of it:

//////////////////////////////////////// //////////////////////////////////////

//

// Manifest file for Windows XP

//

 

# If! Defined (wxuse_no_manifest) | (wxuse_no_manifest = 0)

# If! Defined (wx_msc_full_ver) | wx_msc_full_ver <140040130

 

// See "about isolated Applications" topic in msdn

# Ifdef isolation_aware_enabled

# Define wxmanifest_id 2

# Else

# Define wxmanifest_id 1

# Endif

 

# If defined (wx_cpu_amd64)

Wxmanifest_id 24 "wx/MSW/amd64.manifest"

# Elif defined (wx_cpu_ia64)

Wxmanifest_id 24 "wx/MSW/ia64.manifest"

# Elif defined (wx_cpu_x86)

Wxmanifest_id 24 "wx/MSW/wx. manifest"

# Endif

 

# Endif //! Defined (wx_msc_full_ver) | wx_msc_full_ver <140040130

# Endif //! Defined (wxuse_no_manifest) | (wxuse_no_manifest = 0)

Define wxuse_no_manifest directly on the RC file option of the EXE project, close the manifest definition in Wx. RC, and compile and run it again. Everything is OK.

 

 

 

 

 

References

Compile the wxWidgets-2.8.8 in DLL Mode ( )

WxWidgets and MFC dynamic type information comparison( )

 

 

 

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.