Загрузка...

GTK4 Setup On Windows in VScode with/without CMake (easy) - C/C++

Editor - Visual Studio Code Theme - JetBrains Fleet Timecodes 0:00 - Not Important SKIP IT 2:51 - Prerequisites 10:54 - Adding gcc to PATH 12:12 - Checking 13:00 - SETUP WITH CMAKE 17:08 - Copy from pinned comment 19:16 - Building With CMake 19:49 - ERROR Resloving 21:30 - ERROR Resolved 23:09 - CMakeLists personalization 28:00 - SETUP WITHOUT CMAKE 33:25 - End Links: https://www.msys2.org/ https://www.gtk.org/docs/installations/windows/ ## With CMake Content of CMakeLists.txt: cmake_minimum_required(VERSION 3.0) project(GTKTutorial) set(CMAKE_C_STANDARD 11) set(CMAKE_CXX_STANDARD 17) set(GTK3_INCLUDE_DIRS "C:/msys64/mingw64/include/") set(GTK3_LIBRARY_DIRS "C:/msys64/mingw64/lib") set(ENV{PKG_CONFIG_PATH} "C:/msys64/mingw64/lib/pkgconfig") find_package(PkgConfig REQUIRED) pkg_check_modules(GTK4 REQUIRED gtk4) include_directories(${GTK4_INCLUDE_DIRS}) link_directories(${GTK4_LIBRARY_DIRS}) add_definitions(${GTK4_CFLAGS_OTHER}) add_executable(TutorialApp main.c) # set_target_properties(TutorialApp PROPERTIES WIN32_EXECUTABLE true) # If you dont want console to run with your .exe target_link_libraries(TutorialApp ${GTK4_LIBRARIES}) ## Without Cmake CONTENTS OF 'c_cp_properties.json' file: { "configurations": [ { "name": "Win32", "includePath": [ "${workspaceFolder}/**", "C:/msys64/mingw64/include/gtk-4.0", "C:/msys64/mingw64/include/glib-2.0", "C:/msys64/mingw64/include/**", "C:/msys64/mingw64/lib/**" ], "defines": [ "_DEBUG", "UNICODE", "_UNICODE" ], "windowsSdkVersion": "10.0.22000.0", "compilerPath": "C:/msys64/mingw64/bin/gcc.exe", "cStandard": "c17", "cppStandard": "c++17", "intelliSenseMode": "windows-gcc-x64" } ], "version": 4 } CONTENTS OF 'tasks.json' FILE: { "version": "2.0.0", "tasks": [ { "type": "cppbuild", "label": "C/C++: gcc.exe build active file", "command": "C:/msys64/mingw64/bin/gcc.exe", "args": [ "-fdiagnostics-color=always", "-g", "-IC:/msys64/mingw64/include/gtk-4.0", "-IC:/msys64/mingw64/include/pango-1.0", "-IC:/msys64/mingw64/include", "-IC:/msys64/mingw64/include/glib-2.0", "-IC:/msys64/mingw64/lib/glib-2.0/include", "-IC:/msys64/mingw64/include/harfbuzz", "-IC:/msys64/mingw64/include/freetype2", "-IC:/msys64/mingw64/include/libpng16", "-IC:/msys64/mingw64/include/fribidi", "-IC:/msys64/mingw64/include/cairo", "-IC:/msys64/mingw64/include/pixman-1", "-IC:/msys64/mingw64/include/gdk-pixbuf-2.0", "-IC:/msys64/mingw64/include/webp", "-DLIBDEFLATE_DLL", "-IC:/msys64/mingw64/include/graphene-1.0", "-IC:/msys64/mingw64/lib/graphene-1.0/include", "-mfpmath=sse", "-msse", "-msse2", "${file}", "-LC:/msys64/mingw64/lib", "-lgtk-4", "-lpangowin32-1.0", "-lpangocairo-1.0", "-lpango-1.0", "-lharfbuzz", "-lgdk_pixbuf-2.0", "-lcairo-gobject", "-lcairo", "-lgraphene-1.0", "-lgio-2.0", "-lgobject-2.0", "-lglib-2.0", "-lintl", "-o", "${fileDirname}\\${fileBasenameNoExtension}.exe" ], "options": { "cwd": "C:/msys64/mingw64/bin" }, "problemMatcher": [ "$gcc" ], "group": "build", "detail": "compiler: C:/msys64/mingw64/bin/gcc.exe" } ] } My GItHub: https://github.com/CosecSecCot My Itch.io: https://cosecseccot.itch.io/ gtk setup on windows gtk setup using vscode gtk on windows using vscode gtk setup with cmake gtk setup using cmake on vscode how to setup gtk in vscode how to setup gtk in vscode using cmake how to setup gtk on windows how to setup gtk on windows using cmake gtk cmake vscode cmake

Видео GTK4 Setup On Windows in VScode with/without CMake (easy) - C/C++ автора JavaScript и интеграция с другими языками
Страницу в закладки Мои закладки
Все заметки Новая заметка Страницу в заметки