Perfect solution to Halcon C # programming target platform conflict issues

Source: Internet
Author: User

Perfect solution to Halcon C # programming target platform conflict issuesLandlord #Moreposted: 2016-11-23 10:06background:
Target machine IPC Use 11.0.1 32-bit Halcon reason you know. Development environment Win10 X64 + VS2015 + Halcon 11.0.3 X64 & X86


Question 1:
Development machine on the development of Halcon program, the target platform can only use ANYCPU or X64, using X86 will not, the program will automatically crash without prompting. One-step tracking will make an error here:
This.hwindowcontrol1 = new Halcondotnet.hwindowcontrol ();
For more descriptions see my previous help post:
Http://www.ihalcon.com/read-6410.html
C # Add Halcondotnet.DLL target platform set to X86 error

Each debugging is using the ANYCPU mode, and then, through, and then replaced by X86, the generator is placed in the industrial computer. This method of operation looks fine, and some libraries, such as a camera library that is installed, can only use the X86 mode, causing the development machine to not simultaneously debug programs involving cameras and Halcon. Development library target platform conflict, no way ah, every time you debug this to uninstall the first. Unload DLL Reference, add DLL reference, bored to death.


Question 2:
If 11.0.1 version Halcon is installed on the IPC, the X64 Verson is checked. C # is not able to use Halcon, can compile, cannot start, the program will automatically crash without prompting. One-step tracking will make an error here:
This.hwindowcontrol1 = new Halcondotnet.hwindowcontrol ();




problem Analysis and resolution:
Halcon version of the wrong, for problem 1, is the use of the X64 version of Halcon, but the computer is clearly X86 X64 are installed, Halcondotnet.dll file is one, no version of the points. The original environment variable has a field Halconarch is set to X64-win64, it represents the version used, set it to X86sse2-win32, you can use X86 version Halcondotnet.dll.


DLL version here to switch. Problem 2 is solved, 11.0.1x64 version Halcon is not available, (you know why), only use X86 version. However, Halcon installed in the X64 and X86 version of the Halconarch default set to X64 mode, resulting in unavailability, solve the problem, reinstall Halcon, do not tick X64, or halconarch, change to X86sse2-win32












finally:
This question, do not know whether people have already known, anyway troubled me for a long time,:)

C + + come to the machine vision Novice, look more communication.
2 newest likes:likooo ...  TANGM reply

xingziying Experts
  • Last Login 2017-03-30
  • Number of posts 124
  • 3023 pieces of gold
  • 0 Medal of contribution
Add attention to writing private messages
Sofa # posted: 2016-11-24 09:53 Support, there are problems there are solutions!

Perfect solution to Halcon C # programming target platform conflict issues

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.