flutter_zxing icon indicating copy to clipboard operation
flutter_zxing copied to clipboard

Windows Compilation Failing

Open SimpleTheory opened this issue 1 year ago • 2 comments

Hey there, thank you for creating this zxing binding for flutter. I tried to include this with my app on Windows but the compilation fails, I have tried everything to debug this including cloning this repo recursively and seeing if windows would compile the example app, but unfortunately it doesn't. In the documentation it says Windows is not supported yet, but in pub.dev and in this repos issues, there are mentions of desktop now working for this project, so I don't know if it is supposed to work or not.

Here are the logs left from the attempted compilation of this project's example app:

D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\zxing\core\src\ImageView.h(78,17): error C2589: '(': illegal token on right side of '::' [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\zxing\core\src\ImageView.h(78,1): error C2062: type 'unknown-type' unexpected [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\zxing\core\src\ImageView.h(78,1): error C2059: syntax error: ')' [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\zxing\core\src\ImageView.h(79,17): error C2589: '(': illegal token on right side of '::' [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\zxing\core\src\ImageView.h(79,1): error C2062: type 'unknown-type' unexpected [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\zxing\core\src\ImageView.h(79,1): error C2059: syntax error: ')' [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\zxing\core\src\ImageView.h(80,48): error C2589: '(': illegal token on right side of '::' [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\zxing\core\src\ImageView.h(80,1): error C2062: type 'unknown-type' unexpected [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\zxing\core\src\ImageView.h(80,1): error C2059: syntax error: ')' [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\zxing\core\src\ImageView.h(81,49): error C2589: '(': illegal token on right side of '::' [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\zxing\core\src\ImageView.h(81,1): error C2062: type 'unknown-type' unexpected [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\zxing\core\src\ImageView.h(81,1): error C2059: syntax error: ')' [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\native_zxing.cpp(33,45): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\native_zxing.cpp(21,9): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\native_zxing.cpp(27,9): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\native_zxing.cpp(47,10): error C2375: 'setLogEnabled': redefinition; different linkage [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\native_zxing.cpp(53,17): error C2375: 'version': redefinition; different linkage [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\native_zxing.cpp(60,23): error C2375: 'readBarcode': redefinition; different linkage [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\native_zxing.cpp(86,24): error C2375: 'readBarcodes': redefinition; different linkage [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\native_zxing.cpp(119,25): error C2375: 'encodeBarcode': redefinition; different linkage [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
D:\StudioProjects\flutter_zxing\example\windows\flutter\ephemeral\.plugin_symlinks\flutter_zxing\src\native_zxing.cpp(136,13): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [D:\StudioProjects\flutter_zxing\example\build\windows\plugins\flutter_zxing\shared\flutter_zxing.vcxproj]
Exception: Build process failed.

Please let me know if the project is supposed to work on desktop and more specifically windows, if so if there are any other limitations like versioning. If it is not supposed to work, I would still like to be able to compile the app and just leave some UnsupportedPlatform widgets whenever a Windows user tries to use the scanner.

Kind Regards, SimpleTheory

SimpleTheory avatar May 15 '23 05:05 SimpleTheory

Same issue here with the same errors, the package is marked as having windows platform, so it should at least compile as the OP mentions

Arko109 avatar Jun 21 '23 08:06 Arko109

Seeking Help with Windows Compilation Issue

Hello,

I'm encountering a compilation problem on Windows and could use some assistance in resolving it. Any guidance or solutions would be greatly appreciated.

Thank you, Khoren

khoren93 avatar Sep 04 '23 10:09 khoren93