-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
I tried to run my flutter project on windows device and I got the following error :
C:\Users\hazem\StudioProjects\windows_testing\windows\runner\utils.cpp(54,43): error C2220: warning treated as error - no 'object' file generated [C:\Users\hazem\StudioProjects\windows_testing\build\windows\runner\windows_testing.vcxproj] C:\Users\hazem\StudioProjects\windows_testing\windows\runner\utils.cpp(54,43): warning C4018: '>': signed/unsigned mismatch [C:\Users\hazem\StudioProjects\windows_testing\build\windows\runner\windows_testing.vcxproj] Exception: Build process failed.
after searcing I found that the C2220 error occurs when a warning is treated as an error so I tried to build this c++ file to find if there is any errors or warnings and this is what I found :
fatal error: flutter_windows.h: No such file or directory
so I looked at the runner folder and I found a header file named flutter_window.h .
The file name does not Contain s it's just window so I tried to remove the s in the include command amd it became :
#include <flutter_window.h>
and the error became :
C:\Users\hazem\StudioProjects\windows_testing\windows\runner\utils.cpp(3,10): error C1083: Cannot open include file: 'flutter_window.h': No such file or directory [C:\Users\hazem\StudioProjects\windows_testing\build\windows\runner\windows_testing.vcxproj] Exception: Build process failed.
finally I tried to add the s in the file name and in the include command and the error became :
C:\Users\hazem\StudioProjects\windows_testing\windows\runner\flutter_window.cpp(1,10): error C1083: Cannot open include file: 'flutter_window.h': No such file or directory [C:\Users\hazem\StudioProjects\windows_testing\build\windows\runner\windows_testing.vcxproj] C:\Users\hazem\StudioProjects\windows_testing\windows\runner\main.cpp(5,10): error C1083: Cannot open include file: 'flutter_window.h': No such file or directory [C:\Users\hazem\StudioProjects\windows_testing\build\windows\runner\windows_testing.vcxproj] C:\Users\hazem\StudioProjects\windows_testing\windows\runner\utils.cpp(54,43): error C2220: warning treated as error - no 'object' file generated [C:\Users\hazem\StudioProjects\windows_testing\build\windows\runner\windows_testing.vcxproj] C:\Users\hazem\StudioProjects\windows_testing\windows\runner\utils.cpp(54,43): warning C4018: '>': signed/unsigned mismatch [C:\Users\hazem\StudioProjects\windows_testing\build\windows\runner\windows_testing.vcxproj] Exception: Build process failed.
Any ideas how can I solve this problem ?
Appreciate your help .