I add the full library path to linker and works, but now the function don't makes anything id xalign is 1.0. A change to 0.0 and works.. What's going on?
Code: for(i=0;i<2;i++) if(xHouseList[i].box == NULL){ xHouseList[i].box = gtk_box_new(GTK_ORIENTATION_VERTICAL,0); xHouseList[i].button = gtk_button_new(); // gtk_grid_attach(GTK_GRID(),,i,j,1,1); gtk_widget_set_size_request (xHouseList[i].button,256,-1); // gtk_widget_get_preferred_width_for_height (xHouseList[i].button,266,256,NULL); // gtk_widget_get_preferred_width (xHouseList[i].button,256,NULL); gtk_box_pack_start (GTK_BOX(gtk_builder_get_object(builder, "Home_Houses_Box")),xHouseList[i].button,FALSE,TRUE,0); if(i==0) g_signal_connect (xHouseList[i].button, "clicked", G_CALLBACK (on_House_Button_clicked), NULL); gtk_container_add(xHouseList[i].button,xHouseList[i].box); sprintf(pcTmp,"Pavilhão %d",i+1); xHouseList[i].name_label = gtk_label_new(pcTmp); gtk_box_pack_start (GTK_BOX(xHouseList[i].box),xHouseList[i].name_label,TRUE,TRUE,0); gtk_widget_set_name(xHouseList[i].name_label,"House_Name_Label"); //gtk_style_context_add_class(gtk_widget_get_style_context(xHouseList[i].name_label),"House_Name_Label"); gtk_widget_set_margin_top (xHouseList[i].name_label,10); //HUmidity Box box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,0); gtk_box_pack_start (GTK_BOX(xHouseList[i].box),box,TRUE,TRUE,0); xHouseList[i].hum_label = gtk_label_new("50"); gtk_box_pack_start (GTK_BOX(box),xHouseList[i].hum_label,TRUE,TRUE,0); gtk_label_set_xalign(GTK_LABEL(xHouseList[i].hum_label),1.0); gtk_widget_set_name(xHouseList[i].hum_label,"House_Hum_Num"); label = gtk_label_new("%"); gtk_label_set_xalign (GTK_LABEL(label),1.0); gtk_box_pack_start (GTK_BOX(box),label,TRUE,TRUE,1); gtk_widget_set_name(label,"House_Hum_Label"); //Temperature Box box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,0); gtk_box_pack_start (GTK_BOX(xHouseList[i].box),box,TRUE,TRUE,0); xHouseList[i].temp_label = gtk_label_new("32"); gtk_box_pack_start (GTK_BOX(box),xHouseList[i].temp_label,TRUE,TRUE,1); gtk_label_set_xalign(GTK_LABEL(xHouseList[i].temp_label),1); gtk_widget_set_name(xHouseList[i].temp_label,"House_Temp_Num"); label = gtk_label_new("ºC"); gtk_label_set_xalign (GTK_LABEL(label),1.0); gtk_box_pack_start (GTK_BOX(box),label,TRUE,TRUE,1); gtk_widget_set_name(label,"House_Temp_Label"); gtk_style_context_add_class(gtk_widget_get_style_context(xHouseList[i].box),"House_Box"); // g_object_unref(label); } Thanks Às 14:38 de 17/06/2017, Chris Moller escreveu: ldconfig creates links and caches for runtime libraries. It looks like, even though you've installed GTK+ 3.22, it's not yet in the runtime library path and you're still linking to GTK+ 3.14, which doesn't have gtk_label_set_xalign. Running ldconfig might fix this. Chris Moller On 06/17/17 06:11, Rúben Rodrigues wrote: No, What this makes? Às 03:04 de 17/06/2017, Chris Moller escreveu: Have you tried running sudo /sbin/ldconfig since you installed 3.22.12? On 06/16/17 04:58, Rúben Rodrigues wrote: Hi guys, Someone could help with this? https://stackoverflow.com/questions/44547398/undefined-reference-to-gtk-label-set-xalign Thanks --- Este e-mail foi verificado em termos de vírus pelo software antivírus Avast. https://www.avast.com/antivirus _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org<mailto:gtk-app-devel-list@gnome.org> https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list [https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> Sem vírus. www.avast.com<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list