[gtk:x64-windows] Extra directory depth required for GTK4 #20672
Replies: 9 comments 1 reply
-
Thanks for posting this issue. Since the headers for So for |
Beta Was this translation helpful? Give feedback.
-
I've been believing vcpkg does not require VS setting to use a library... |
Beta Was this translation helpful? Give feedback.
-
Thanks for your focus on this issue. As I said above, you need to add the path to your project manually, then include the headers as normal. |
Beta Was this translation helpful? Give feedback.
-
Yeah, at least the vcpkg readme promises:
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
i am facing the same issue with the gtk4 integration. With gtk it was really easy as there was no nested directory structure for the version. Is is planned to have multiple versions of the same library installed for a vcpkg root? With the new option to specify an install dir I think it is not necessary, and the includes should be provided as before. I am glad you opened this thread as I thought somewhat broke with my integration during the update, but this confirms that the directories have changed. |
Beta Was this translation helpful? Give feedback.
-
Any plans for this issue? If it ends up being a "won't fix", then I'll be raising a bug on the readme file on the snippet quoted by Hemaolle
|
Beta Was this translation helpful? Give feedback.
-
If the upstream behavior causes the header file to be installed in gtk-4.0, this is by design and conflicts with the example code provided by the upstream. |
Beta Was this translation helpful? Give feedback.
-
IIUC the problem is (convenience in) Visual Studio: |
Beta Was this translation helpful? Give feedback.
-
Describe the bug
when I try to #include the GTK-4.0 library the files are located in a extra directory so rather than #include<gtk/gtk.h> Visual Studio can see them in #include <gtk-4.0/gtk/gtk.h> but the files make no reference to this extra directory depth. See attached screen shots.
This also affect the other libraries that are installed as part of GTK4 such as Glib-2.0
So have had to manually add in the extra directories into all the #include's in all the .h files
Environment
To Reproduce
Steps to reproduce the behavior:
using the Visual Studio x64 Native Tools Command Prompt
git clone https://github.com/Microsoft/vcpkg.git
.\vcpkg\bootstrap-vcpkg.bat
.\vcpkg install gtk:x64-windows
.\vcpkg integrate install
Created a new project in Visual Studio.
Changed the file extension to .c
Changed the solution platform to x64
Copied and pasted the hello world program from https://www.gtk.org/docs/getting-started/hello-world/
Compiler cannot find gtk.h also indicated by Squiggly red lines from intellisense and does not compile.
After going into I think all of the .h files and adding the extra directory names into the #include statements the files are now found and the program compiles and runs.
Expected behaviour
The gtk.h and all library files are found, the hello world program compiles and runs.
Failure logs
-(please attached failure logs)
Additional context
Add any other context about the problem here.
Beta Was this translation helpful? Give feedback.
All reactions