GTK+ Visual Studio 2019
GTK+ with Visual Studio 2019
我正在尝试在 windows 10 上安装 GTK project,并将其与 Visual Studio 集成以便使用 C.
构建应用程序
按照他们的 tutorial on installation , I have found myself at step 5 successfully, yet when I open visual studio to try and compile the "hello world" 键入代码后它无法识别 header
#include <gtk/gtk.h>
并吐出错误
Error LNK2019 unresolved external symbol
gtk_window_set_child referenced in function activate
和
Error LNK1120 1 unresolved externals test
所以我回到 this 页面并按照“使用 MSYS2 包中的 GTK”部分进行操作,再次,没有雪茄。
我按照 these instructions 继续完成这些步骤,虽然 IDE 现在可以识别 header 并自动完成,但似乎我仍然做错了......
控制台的错误是(在尝试了几种执行代码的方法之后)
D:\CDev\test>gcc -o test test.c `pkg-config --cflags --libs
gtk4`
gcc: error: `pkg-config: No such file or directory
gcc: error: gtk4`: No such file or directory
gcc: error: unrecognized command-line option '--cflags'
gcc: error: unrecognized command-line option '--libs'
D:\CDev\test>gcc test.c
test.c:1:10: fatal error: gtk/gtk.h: No such file or
directory
1 | #include <gtk/gtk.h>
有人有什么想法吗?
我想知道这是否相关...
{
"cmake.configureSettings": {
"CMAKE_TOOLCHAIN_FILE": "[vcpkg root]/scripts/buildsystems/vcpkg.cmake"
}
}
但我对开始使用 cmake 犹豫不决
记住:
`
而不是
'
在命令中。
如果您看到此页面,请使用此 documentation!
我正在尝试在 windows 10 上安装 GTK project,并将其与 Visual Studio 集成以便使用 C.
构建应用程序按照他们的 tutorial on installation , I have found myself at step 5 successfully, yet when I open visual studio to try and compile the "hello world" 键入代码后它无法识别 header
#include <gtk/gtk.h>
并吐出错误
Error LNK2019 unresolved external symbol
gtk_window_set_child referenced in function activate
和
Error LNK1120 1 unresolved externals test
所以我回到 this 页面并按照“使用 MSYS2 包中的 GTK”部分进行操作,再次,没有雪茄。
我按照 these instructions 继续完成这些步骤,虽然 IDE 现在可以识别 header 并自动完成,但似乎我仍然做错了......
控制台的错误是(在尝试了几种执行代码的方法之后)
D:\CDev\test>gcc -o test test.c `pkg-config --cflags --libs
gtk4`
gcc: error: `pkg-config: No such file or directory
gcc: error: gtk4`: No such file or directory
gcc: error: unrecognized command-line option '--cflags'
gcc: error: unrecognized command-line option '--libs'
D:\CDev\test>gcc test.c
test.c:1:10: fatal error: gtk/gtk.h: No such file or
directory
1 | #include <gtk/gtk.h>
有人有什么想法吗?
我想知道这是否相关...
{
"cmake.configureSettings": {
"CMAKE_TOOLCHAIN_FILE": "[vcpkg root]/scripts/buildsystems/vcpkg.cmake"
}
}
但我对开始使用 cmake 犹豫不决
记住:
`
而不是
'
在命令中。
如果您看到此页面,请使用此 documentation!