Skip to content

Fix link error with gtk2. - #20857

Closed
Rhialto wants to merge 1 commit into
vim:masterfrom
Rhialto:rhialto-fix-gtk2
Closed

Fix link error with gtk2.#20857
Rhialto wants to merge 1 commit into
vim:masterfrom
Rhialto:rhialto-fix-gtk2

Conversation

@Rhialto

@Rhialto Rhialto commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

The function gtk_widget_get_scale_factor() doesn't exist for gtk2.

ld: objects/gui_gtk_x11.o: in function `gui_mch_init': gui_gtk_x11.c:(.text+0x33f1): undefined reference to `gtk_widget_get_scale_factor' 
link.sh: Linking failed
*** Error code 1

Stop.

Earlier in the same source file, the use of the function is protected by a # if GTK_CHECK_VERSION(3,10,0) so I used the same condition in this case.

ld: objects/gui_gtk_x11.o: in function `gui_mch_init':
gui_gtk_x11.c:(.text+0x33f1): undefined reference to `gtk_widget_get_scale_factor'
link.sh: Linking failed
*** Error code 1

Stop.
@chrisbra

Copy link
Copy Markdown
Member

Thanks, looks correct.

@chrisbra chrisbra closed this in 69db19f Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants