如何使用Visual Studio 2019构建GTK +应用程序? [英] How to build GTK+ application with Visual Studio 2019?

查看:491
本文介绍了如何使用Visual Studio 2019构建GTK +应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照 https://www.gtk.org/download/中的说明安装了GTK + 3.0.windows.php 我克隆了git并键入 vcpkg install gtk:x64-windows 一切顺利.然后我打开Visual Studio 2019,并尝试使用C ++创建控制台应用程序.我更改了项目,使其在C而不是C ++中进行编译.但是,当我键入 #include< gtk/gtk.h> 时,它不会在自动完成时显示.我不确定从这里要去哪里.有人可以给我指点吗?我想使用Visual Studio 2019构建静态链接的gtk-3.0应用程序.我已经在Glade上设计了界面.

I installed GTK+ 3.0 as described on https://www.gtk.org/download/windows.php I cloned the git and typed vcpkg install gtk:x64-windows Everything build well. I then opened Visual Studio 2019 and tried to create a console application using C++. I changed the project so it compiles in C instead of C++. However, when I type #include <gtk/gtk.h> it doesn't show on auto complete. I'm not sure where to go from here. Can someone give me any pointers? I want to build a statically linked gtk-3.0 application using visual studio 2019. I already designed the interface on Glade.

推荐答案

假设您已经在vcpkg目录中运行了"vcpkg Integrated install"命令,您所要做的就是将visual studio中的配置更改为x64,如下所示:屏幕截图.屏幕截图

Assuming you have ran the command "vcpkg integrate install" in your vcpkg directory, all you need to do is change the configuration in visual studio to x64 as shown in the screenshot.screenshot

这篇关于如何使用Visual Studio 2019构建GTK +应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆