I see some tutorials use the yellow one on msys. I was curious if it matters, as far as, when you go to use pac man for gtk in the yellow term versus the blue term? I would think it would.
I think I did that in my previous video (which did not had voice over), I dont remember it that clearly tbh, I think I need to remake this tutorial now lol
@@cosecseccot no worries actually, I think in one of the steps I goofed up and missed a crucial ming64 install. I think it works now. Thanks for the video, it is very good.
Around the 18m mark, you copy just the application and yet VS Code knows the compiler / target to build it? Did you setup a makefile off-camera? I'd like to use the Free Visual Studio Community.. any thoughts on getting GTK4 on windows using gvsbuild to generate the gtk-build projects (ninja, meson, cmake, gtk4). According to the readme, it says it still needs MSYS2 (but not sure why), it seems to it only needs to do: pip install gvsbuild gvsbuild build gtk4
1. its because of the cmakelists.txt file, and i build the project before copying the code, as it says 'gtk4 found'. 16:52 2. i think thats becuase gtk4 is in msys2's include directories, if you check out the cmakelists.txt code, every include file and libraries are in 'mysys64/mingw64/' directory (i actually dont know what gvsbuild and the other stuff is, i can make a video about that after some research)
@@cosecseccotThanks! A video would be great on how to setup Visual Studio Community to include/link to the correct GTK files, setup compiler/makefiles, etc. For example, even installing GTK via: vcpkg install gtk:x64-windows and vcpkg integrate install requires one to write a vcpkg.jsonn file!
@@bennguyen1313 ahh, I actually tried installing gtk through vcpkg but I couldn't most probably because I didn't knew you had to make a vcpkg.json Thank you for subscribing, will be making a new video soon
Hey I am getting the error at around 16:48 mins, Bad CMake executable: "". Check to make sure it is installed or the value of the "cmake.cmakePath" setting contains the correct path. I tried re-installing the extensions, but its still there. Could you please help?
Maybe you forgot to put the cmake executable to path, try runing make on your terminal to check it's on system PATH if it's working fine Try moving it up, like what I did in the error resolving part As u can see in 22:14 I have C:\CMake\bin in the path with other things Try to move these up
I'm having the same problem, but already have cmake installed, system Path has been configured, even I set the cmakepath on that folder (for me "C:\\Program Files\Cmake\bin") and just keep failing@@cosecseccot
At 16:48 of the vdo, i am getting the error as bad cmake executable:"".check to make sure it is installed or the value of the "cmake.cmakepath" setting contains the correct path I read some other person comment too you suggested him to add path but i am not getting it, Can you help me with this please.
1. Try reinstalling c++ extensions 2. Try reinstalling cmake 3. Try adding this line in your project settings folder "cmake.cmakePath": "path\\to\\cmake" (Replace it with your path to cmake) Try each step to check if it resolves your issue
can u pls help me with this cmake error. Once I clicked command pallet --> cmake configure --> I get this error --> "Bad CMake executable: "cmake.camkepath". Check to make sure it is installed or the value of the "cmake.cmakePath" setting contains the correct path". I tried many ways but caunt figur it out
Hi, it says "[rollbar] Unhandled exception: Unhandled Promise rejection: build Error: Build failed: Unable to configure the project {}" i tried to do it using cmake and try to include the directories in the include path line using intellisense but still doesnt work for me. The thing is I accidentally changed my user variable path too, so I dont know if that's the issue, my system variable path is unaffected but i accidentally replaced the user variable, so i dont know if this is the reason that its not working, and if i want to try restoring the user variable path, do you know how can it be done?
@@victoragahi5915 try chatgpt ? Ask it to "how to setup gtk3 on windows in vscode using cmake" If you get any errors in the code it writes, tell gpt the errors and work on it, if they are un resolved try to understand the errors from stack overflow or chatgpt itself and work your way through
Brother, This is very useful 😊 But When i do some modifications . For eg, First I run As Hello world, then i clicked run task and the output is correct.. Then i changed the value as "welcome" and clicked run task, but it shows hello world again why ?
@@andriamilaminamanohiarivel6083 sorry i didnt saw ur comment earlier, im glad it worked for you :) Try using chatgpt, its really helpful for these kinds of errors, i use it all the time
Sample Code:
#include
static void print_hello(GtkWidget *widget, gpointer data) { g_print("Hello World
"); }
static void activate(GtkApplication *app, gpointer user_data) {
GtkWidget *window;
GtkWidget *label = gtk_label_new (NULL);
window = gtk_application_window_new(app);
gtk_window_set_title(GTK_WINDOW(window), "GTK-4.0 Test Window");
gtk_window_set_default_size(GTK_WINDOW(window), 800, 600);
gtk_label_set_markup (GTK_LABEL (label), "Hello World");
gtk_label_set_xalign(GTK_LABEL (label), 0.5f);
gtk_label_set_yalign(GTK_LABEL (label), 0.5f);
gtk_window_set_child(GTK_WINDOW(window), label);
gtk_window_present(GTK_WINDOW(window));
}
int main(int argc, char **argv) {
GtkApplication *app;
int status;
app = gtk_application_new("org.gtk.example", G_APPLICATION_DEFAULT_FLAGS);
g_signal_connect(app, "activate", G_CALLBACK(activate), NULL);
status = g_application_run(G_APPLICATION(app), argc, argv);
g_object_unref(app);
return status;
}
I spent one week trying to find a solution like this one, THANK YOU!
you for sure deserve the follow, like and all the rest, can't belive how much hurdle one library needs (I mean a collection of libraries).
Thank youu 🙏
ty! I really need this for a job, hugs from Brazil =)
wszystko prosto i po kolei 😘😘
I see some tutorials use the yellow one on msys. I was curious if it matters, as far as, when you go to use pac man for gtk in the yellow term versus the blue term? I would think it would.
In your video, do we need to copy GTK include directories into msys64?
edit: nevermind, I missed a ming step. It works now. Thanks.
I think I did that in my previous video (which did not had voice over), I dont remember it that clearly tbh, I think I need to remake this tutorial now lol
@@cosecseccot no worries actually, I think in one of the steps I goofed up and missed a crucial ming64 install. I think it works now. Thanks for the video, it is very good.
thank you very much
you saved my life
Thankyou 🙏🙏
Around the 18m mark, you copy just the application and yet VS Code knows the compiler / target to build it? Did you setup a makefile off-camera?
I'd like to use the Free Visual Studio Community.. any thoughts on getting GTK4 on windows using gvsbuild to generate the gtk-build projects (ninja, meson, cmake, gtk4). According to the readme, it says it still needs MSYS2 (but not sure why), it seems to it only needs to do:
pip install gvsbuild
gvsbuild build gtk4
1. its because of the cmakelists.txt file, and i build the project before copying the code, as it says 'gtk4 found'. 16:52
2. i think thats becuase gtk4 is in msys2's include directories, if you check out the cmakelists.txt code, every include file and libraries are in 'mysys64/mingw64/' directory
(i actually dont know what gvsbuild and the other stuff is, i can make a video about that after some research)
@@cosecseccotThanks! A video would be great on how to setup Visual Studio Community to include/link to the correct GTK files, setup compiler/makefiles, etc. For example, even installing GTK via:
vcpkg install gtk:x64-windows and vcpkg integrate install
requires one to write a vcpkg.jsonn file!
@@bennguyen1313 ahh, I actually tried installing gtk through vcpkg but I couldn't most probably because I didn't knew you had to make a vcpkg.json
Thank you for subscribing, will be making a new video soon
Bro I moved mingw path up in environmental variables still while running exe file i am having the error. What to do?
Sir i am geeting an error while compilng c file which includes gtk.h file
How to share image of it to you
just tell me the error
most probably you got the include directories wrong, so cross check to see if they are there
Hey I am getting the error at around 16:48 mins, Bad CMake executable: "". Check to make sure it is installed or the value of the "cmake.cmakePath" setting contains the correct path. I tried re-installing the extensions, but its still there. Could you please help?
Maybe you forgot to put the cmake executable to path, try runing make on your terminal to check it's on system PATH
if it's working fine
Try moving it up, like what I did in the error resolving part
As u can see in 22:14 I have C:\CMake\bin in the path with other things
Try to move these up
I'm having the same problem, but already have cmake installed, system Path has been configured, even I set the cmakepath on that folder (for me "C:\\Program Files\Cmake\bin") and just keep failing@@cosecseccot
@@kapichy97 maybe you also need to install make, use choco to install it
At 16:48 of the vdo, i am getting the error as
bad cmake executable:"".check to make sure it is installed or the value of the "cmake.cmakepath" setting contains the correct path
I read some other person comment too you suggested him to add path but i am not getting it, Can you help me with this please.
1. Try reinstalling c++ extensions
2. Try reinstalling cmake
3. Try adding this line in your project settings folder
"cmake.cmakePath": "path\\to\\cmake"
(Replace it with your path to cmake)
Try each step to check if it resolves your issue
Hey I am getting the same issue, did you resolve it?
@cosecseccot your the best man you helped me a lot with this tutorial thx for everything.
can u pls help me with this cmake error. Once I clicked command pallet --> cmake configure --> I get this error --> "Bad CMake executable: "cmake.camkepath". Check to make sure it is installed or the value of the "cmake.cmakePath" setting contains the correct path". I tried many ways but caunt figur it out
You probably haven't installed cmake, and if you have you need to add it to "PATH"
That might fix the issue
Hi, it says "[rollbar] Unhandled exception: Unhandled Promise rejection: build Error: Build failed: Unable to configure the project {}" i tried to do it using cmake and try to include the directories in the include path line using intellisense but still doesnt work for me. The thing is I accidentally changed my user variable path too, so I dont know if that's the issue, my system variable path is unaffected but i accidentally replaced the user variable, so i dont know if this is the reason that its not working, and if i want to try restoring the user variable path, do you know how can it be done?
I think you should try chatgpt, since ur problem is very specific, I will try to recreate your problem in the meantime and get back at u
thank you so much for your cooperation ur da best@@cosecseccot
hey bro that doesn't work for me, I want to download GTK3 on my Windows PC and your tutorial didn't help me, do you have advice pr GTK3 ?
I'm sorry bro, I haven't tried gtk3, but ... all I can say is thoroughly follow instructions on their website
Like see some cmake tutorials, it's not too hard, you will get it, and utilize it for gtk3
@@cosecseccot yeah I spend 4 hours to watch tutorial and nothing change
@@victoragahi5915 try chatgpt ? Ask it to "how to setup gtk3 on windows in vscode using cmake"
If you get any errors in the code it writes, tell gpt the errors and work on it, if they are un resolved try to understand the errors from stack overflow or chatgpt itself and work your way through
11:00 the bin folder its empty, what i have to do?
@@rofy9969 try reinstalling it
Brother, This is very useful 😊
But When i do some modifications .
For eg, First I run As Hello world, then i clicked run task and the output is correct..
Then i changed the value as "welcome" and clicked run task, but it shows hello world again why ?
u forgot to save the file after u changed it to "welcome" i think
@@cosecseccot I will check out Brother..
thank u so much i literally cried after setting this up🥲
np man, im glad it could help
how do i revert back and remove everything gtk
make a new project or start wih a new folder ? i dont know what do you mean exactly
bro cmake error
Tell me the error
i don't know why but i get these error when i try to build the code ;
[build] Starting build
[proc] Executing command: "C:\Program Files\CMake\bin\cmake.exe" --build "c:/Users/dell/Documents/GTK tutorial/build" --config Debug --target all -j 6 --
[build] [ 50%] Building C object CMakeFiles/TutorialApp.dir/main.c.obj
[build] gcc.exe: fatal error: cannot specify '-o' with '-c', '-S' or '-E' with multiple files
[build] compilation terminated.
[build] mingw32-make[2]: *** [CMakeFiles\TutorialApp.dir\build.make:76: CMakeFiles/TutorialApp.dir/main.c.obj] Error 1
[build] mingw32-make[1]: *** [CMakeFiles\Makefile2:82: CMakeFiles/TutorialApp.dir/all] Error 2
[build] mingw32-make: *** [Makefile:90: all] Error 2
[proc] The command: "C:\Program Files\CMake\bin\cmake.exe" --build "c:/Users/dell/Documents/GTK tutorial/build" --config Debug --target all -j 6 -- exited with code: 2
[driver] Build completed: 00:00:00.473
[build] Build finished with exit code 2
can you help me ?
nevermind i 've figured it out ,thank you such a good video
@@andriamilaminamanohiarivel6083 sorry i didnt saw ur comment earlier, im glad it worked for you :)
Try using chatgpt, its really helpful for these kinds of errors, i use it all the time
i didn't use cmake and i followed all the steps i also stup all that files
fatal error: gtk/gtk.h: No such file or directory
#include
^
I recommend you to use cmake since this tutorial has gotten pretty old and the usual way might not work
You can try checking the include directories in vscode tho
I need your email for technical support I am getting errors with and without cmake could you please help me?