I keep getting a broken image (red “X” in the document, it doesn’t even load the one I want, I don’t know if this is clear enough) and don’t know why, here it is what I tried:
image = gtk_image_new_from_file("abc.png");
gtk_container_add (GTK_CONTAINER (window), image);
gtk_widget_show (image);
gtk_widget_show (window);`
I am new to GUI programming, so please be beautiful! Ha
I forgot to say it's under the windows
UPDATE: noticed that the error is in "gdk_pixbuf_new_from_file", it returns me the error value, cannot solve the problem yet
If I run the debugger, it says: "Error loading file: # 4 Could not open file" abc.jpeg ": there is no such file or directory," should it be in the folder where the executable file is located? anyway, if I put the full path, he will not find it either
source
share