Windows Programmierung ed
Visual Studio 2013 ed
OpenGL ed
Dateien glext.h und wglext.h googlen und (von opengl.org) herunterladen. Dann unter C:\Program Files (x86)\Windows Kits\8.1\Include\um\gl ablegen.
Bibliotheken ed
am saubersten über Macros...
zuerst das Macro definieren:
- im Menü: View, Other Windows, Property Manager
- per rechtsklick auf eine (beliebige) Konfiguration, Add New Project Property Sheet
- anlegen
- Doppelklick
- Common Properties, User Macros
- ...
dann die Bibliotheken einbinden:
- Project, Properties
- Configuration Properties, VC++ Directories
- All Configurations
- $(MeinMacro)\lib...
gtk3 in Visual Studio (2019) ed
gtk ed
https://www.gtk.org/docs/installations/windows/
via msys bash:
git clone https://github.com/Microsoft/vcpkg
via cmd.exe in same folder:
.\bootstrap-vcpkg.bat vcpkg install gtk:x64-windows
now, vs automatically finds and links when using
#include
compiled exe files even seem to run from within windows
themes ed
mostly, copy icons from /usr/share/icons/Adwaita...
- running directly inside the project folder (bash)
- copy into Project/share/icons
- also copy .exe and *.dll from ./x64/Debug/ into ./
- running inside Visual Studio
- copy into Project/x64/Debug/share/icons
more after some experiments...
msys2 ed
download from https://github.com/msys2/msys2/wiki/MSYS2-installation#iv-general-package-management
pacman -Syu # restart pacman -Syu pacman -S mingw-w64-x86_64-toolchain base-devel mingw-w64-x86_64-gtk3
into ~/.bashrc
PATH=_PATH:/mingw64/bin # dollar sign... PKG_CONFIG_PATH=_PKG_CONFIG_PATH:/mingw64/lib/pkgconfig
pacman -S git meson nano openssh pacman -S mingw-w64-x86_64-fftw mingw-w64-x86_64-libogg mingw-w64-x86_64-libvorbis mingw-w64-x86_64-flac mingw-w64-x86_64-portaudio
sometimes important paths seem to not work... or other horrible things happening
export CPATH=/mingw64/include/gtk-3.0/:/mingw64/include/glib-2.0:/mingw64/lib/glib-2.0/include:/mingw64/include/pango-1.0:/mingw64/include/cairo:/mingw64/include/gdk-pixbuf-2.0:/mingw64/include/atk-1.0
unwind seems to come without headers.... don't install
Visual Studio 2022 ed
cmake + vcpkg ed
- create new cmake project (solution dir = project dir)
- run development shell
vcpkg new --application vcpkg add port glfw3
- edit CMakePresets.json
- in "windows-base" remove "cacheVariables"
- add "toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
- delete + generate cache
- CMakeLists.txt
find_package(glfw3 REQUIRED) target_link_libraries(... glfw)
working directory ed
- solution explorer - views ... cmake
- right click on executable -> Debug and launch settings... edit file, add
"currentDir": "${workspaceRoot}"gtk4 ed
https://github.com/wingtk/gvsbuild
gvsbuild build gtk4 libadwaita adwaita-icon-theme
CMakeLists.txt
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK4 gtk4)
pkg_check_modules(LIBADWAITA-1 libadwaita-1)
target_include_directories(... PUBLIC ${GTK4_INCLUDE_DIRS})
target_include_directories(... PUBLIC ${LIBADWAITA-1_INCLUDE_DIRS})
target_link_directories(... PUBLIC ${GTK4_LIBRARY_DIRS})
target_link_directories(... PUBLIC ${LIBADWAITA-1_LIBRARY_DIRS})
target_compile_definitions(... PUBLIC ${GTK4_CFLAGS_OTHER})
target_compile_definitions(... PUBLIC ${LIBADWAITA-1_CFLAGS_OTHER})
target_link_libraries(... ${GTK4_LIBRARIES} ${LIBADWAITA-1_LIBRARIES})