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. |