我该如何解决这些警告?
// midiNote is a double as it is used in floating point equation
// v is int because that's informative that the function wants whole numbers
void setMidiNote(int v) { midiNote = v-48; }
Run Code Online (Sandbox Code Playgroud)
Warning C26451 Arithmetic overflow: Using operator '-' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '-' to avoid overflow (io.2).
// input should be 0 to 10 integer, …Run Code Online (Sandbox Code Playgroud) 更新:
我想直接从 .NET Core SDK 调用 F# 编译器(即 fsc)。
我知道 dotnet build & co,但是当我只需要编译一个简单的问题时,我不想涉及它们,即在 fsc file.fs 就足够的情况下。
我尝试在 .NET Core SDK 中搜索(在我的 Mac 上,它在 /usr/local/share/dotnet/sdk/2.2.102/FSharp 中)并在那里找到了一个 fsc.exe 文件。不幸的是,当我尝试使用 dotnet /usr/local/share/dotnet/sdk/2.2.102/FSharp/fsc.exe 启动它时,它给了我一个错误:
error FS0193: Could not load file or assembly 'Microsoft.Build.Tasks.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
Run Code Online (Sandbox Code Playgroud)
环境:macOS,.NET Core 2.2
可以在没有QML的情况下构建Qt项目吗?例如,对于没有GUI的构建项目,我们应该使用密钥-no-gui?QML怎么样?谢谢.