在 VS2019 中使用 GTK+ 时 ffiw64.c 中的读取访问冲突
Read access violation in ffiw64.c when using GTK+ in VS2019
我已按照 Setting up GTK for Windows 中的说明使用 vcpkg 在 Windows 中设置 GTK+。
git clone https://github.com/Microsoft/vcpkg
cd vcpkg
.\bootstrap-vcpkg.bat
vcpkg install gtk:x64-windows
并将其与 Visual Studio
集成
vcpkg integrate install
编译应用程序没问题,我使用的示例代码来自 here。
在运行时,甚至在 window 出现之前,我在 ffiw64.c 的第 173 行得到一个异常。
Unhandled exception thrown: read access violation.
pn was 0x111011101110111. occurred
有人知道可能是什么问题吗?
编辑:
回答了我自己的问题,但我会保留它以防它对其他人有帮助。
没关系,我发现了问题。
我确实在使用 x64
解决方案平台,但解决方案配置必须设置为 Release
。
知道为什么会出现这个问题吗?我认为 vcpkg
安装了 Debug
配置所需的依赖项。
我已按照 Setting up GTK for Windows 中的说明使用 vcpkg 在 Windows 中设置 GTK+。
git clone https://github.com/Microsoft/vcpkg
cd vcpkg
.\bootstrap-vcpkg.bat
vcpkg install gtk:x64-windows
并将其与 Visual Studio
集成vcpkg integrate install
编译应用程序没问题,我使用的示例代码来自 here。
在运行时,甚至在 window 出现之前,我在 ffiw64.c 的第 173 行得到一个异常。
Unhandled exception thrown: read access violation. pn was 0x111011101110111. occurred
有人知道可能是什么问题吗?
编辑:
回答了我自己的问题,但我会保留它以防它对其他人有帮助。
没关系,我发现了问题。
我确实在使用 x64
解决方案平台,但解决方案配置必须设置为 Release
。
知道为什么会出现这个问题吗?我认为 vcpkg
安装了 Debug
配置所需的依赖项。