You are not logged in.

#1 2024-07-05 13:31:52

Tsw1985
Member
Registered: 2024-07-05
Posts: 5

GTK 3 C project was working on Ubuntu but on Arch not

Hi, Im new on arch. Like the title says, I have a project on C , using GTK3 on Ubuntu. Now I changed to Arch Linux.

My current code was working fine , also the make file . I installed all need it on Arch , the Gtk lib ... Gcc ... all need it.  Also I can do a new hello world on GTK and compile and works on Arch but now, but If I compile the project with "make" like always ,I have some problems. For example , now I have this issue , on Ubuntu all compiled fine :

src/add_contact_window.c: In function ‘open_add_contact_window’:
src/add_contact_window.c:84:28: error: passing argument 1 of ‘gtk_entry_set_text’ from incompatible pointer type [-Wincompatible-pointer-types]
   84 |         gtk_entry_set_text(name_entry,_contact->name);
      |                            ^~~~~~~~~~
      |                            |
      |                            GtkWidget * {aka struct _GtkWidget *}

This code should be works , because on Ubuntu was working.

I installed the GTK using "pacman -S gtk3" like I readed on the wiki. Like I said, on Ubutu I do not had that problem. It is like if the gtklib is not equal like Ubuntu ...

I need help. Thank you guys.

Last edited by Tsw1985 (2024-07-05 13:32:53)

Offline

#2 2024-07-05 13:41:24

Scimmia
Fellow
Registered: 2012-09-01
Posts: 12,079

Re: GTK 3 C project was working on Ubuntu but on Arch not

you were using an old gcc on Ubuntu. It used to just be a warning, now it's an error by default. Since it's your code, you'd best fix it instead of ignoring it by turning off the check again.

Offline

#3 2024-07-05 14:01:56

Tsw1985
Member
Registered: 2024-07-05
Posts: 5

Re: GTK 3 C project was working on Ubuntu but on Arch not

Ok, thank you . I will try to fix it. When I get it, I will put this like "SOLVED".  Thank you my friend

Offline

#4 2024-07-05 15:15:41

Tsw1985
Member
Registered: 2024-07-05
Posts: 5

Re: GTK 3 C project was working on Ubuntu but on Arch not

Yes . That was the problem . I fix the code and now works.

Offline

Board footer

Powered by FluxBB