rive-app / rive-flutter

Flutter runtime for Rive
https://rive.app
MIT License
1.16k stars 180 forks source link

An attempt to build rive_common_plugin.vcxproj causes a fail #369

Closed ServOKio closed 3 months ago

ServOKio commented 3 months ago

Description

When I try to build a windows application, I get a message: Building Windows application... Error: Build process failed.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Go to 'pubspec.yaml' and add rive: 0.11.11 to dependencies section
  2. Run flutter clean
  3. Build windows app (like flutter build windows -v)
  4. See error ⚠️

Device & Versions

[√] Flutter (Channel stable, 3.19.0, on Microsoft Windows [Version 10.0.19045.4170], locale en-US)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Professional 2019 16.0.2)
[√] Android Studio (version 2022.3)
[√] Connected device (3 available)
[√] Network resources

Flutter 3.19.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision bae5e49bc2 (5 weeks ago) • 2024-02-13 17:46:18 -0800
Engine • revision 04817c99c9
Tools • Dart 3.3.0 • DevTools 2.31.1

Additional context

Some verbose log:

[   +2 ms] FinalizeBuildStatus:
[        ]   Deleting file "window_manager_plugin.dir\Release\window_m.FA778195.tlog\unsuccessfulbuild".
[        ]   Touching "window_manager_plugin.dir\Release\window_m.FA778195.tlog\window_manager_plugin.lastbuildstate".
[        ] Done Building Project "C:\Users\Tiger\AndroidStudioProjects\CImagen\cimagen\build\windows\x64\plugins\window_manager\window_manager_plugin.vcxproj" (default targets).
[        ] Done Building Project "C:\Users\Tiger\AndroidStudioProjects\CImagen\cimagen\build\windows\x64\runner\cimagen.vcxproj" (default targets) -- FAILED.
[        ] Done Building Project "C:\Users\Tiger\AndroidStudioProjects\CImagen\cimagen\build\windows\x64\ALL_BUILD.vcxproj" (default targets) -- FAILED.
[        ] Done Building Project "C:\Users\Tiger\AndroidStudioProjects\CImagen\cimagen\build\windows\x64\INSTALL.vcxproj" (default targets) -- FAILED.
[        ] Build FAILED.
[   +2 ms] "C:\Users\Tiger\AndroidStudioProjects\CImagen\cimagen\build\windows\x64\INSTALL.vcxproj" (default target) (1) ->
[        ] "C:\Users\Tiger\AndroidStudioProjects\CImagen\cimagen\build\windows\x64\ALL_BUILD.vcxproj" (default target) (3) ->
[        ] "C:\Users\Tiger\AndroidStudioProjects\CImagen\cimagen\build\windows\x64\runner\cimagen.vcxproj" (default target) (4) ->
[        ] "C:\Users\Tiger\AndroidStudioProjects\CImagen\cimagen\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj" (default target) (9) ->
[        ] (ClCompile target) ->
[        ]   cl : Command line error D8021: invalid numeric argument '/Wno-c++98-compat' [C:\Users\Tiger\AndroidStudioProjects\CImagen\cimagen\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
[        ]     0 Warning(s)
[        ]     1 Error(s)
[        ] Time Elapsed 00:00:50.27
[  +14 ms] Building Windows application... (completed in 51.2s)
[   +1 ms] "flutter windows" took 51,871ms.
[   +3 ms] Build process failed.
[   +1 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
           #1      _runBuild (package:flutter_tools/src/windows/build_windows.dart:262:5)
           <asynchronous suspension>
           #2      buildWindows (package:flutter_tools/src/windows/build_windows.dart:109:5)
           <asynchronous suspension>
           #3      BuildWindowsCommand.runCommand (package:flutter_tools/src/commands/build_windows.dart:56:5)
           <asynchronous suspension>
           #4      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1389:27)
           <asynchronous suspension>
           #5      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
           <asynchronous suspension>
           #6      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
           <asynchronous suspension>
           #7      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:355:9)
           <asynchronous suspension>
           #8      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
           <asynchronous suspension>
           #9      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:295:5)
           <asynchronous suspension>
           #10     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:119:9)
           <asynchronous suspension>
           #11     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
           <asynchronous suspension>
           #12     main (package:flutter_tools/executable.dart:90:3)
           <asynchronous suspension>

[ +152 ms] ensureAnalyticsSent: 150ms
[        ] Running 0 shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 1

It looks like I'm having trouble building a plugin

cl : Command line error D8021: invalid numeric argument '/Wno-c++98-compat' [C:\Users\Tiger\AndroidStudioProjects\CImagen\cimagen\build\windows\x64\plugins\rive_common\rive_common_plugin.vcxproj]
HayesGordon commented 3 months ago

Hi @ServOKio , were you previously able to build Rive for Windows? If yes, what Rive-Flutter version were you using before?

Please note that to build Rive for Windows, you should have a Clang compiler installed and configured to be used. See here: https://github.com/rive-app/rive-flutter/blob/master/platform_considerations.md#windows

ServOKio commented 3 months ago

Thanks a lot for the answer, but now I seem to be facing this/this problem 🤦‍♂️