- Код: Выделить всё
ln -s /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so /usr/lib/libgtk.so
ln -s /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so /usr/lib/libgdk.so
ln -s /usr/lib/x86_64-linux-gnu/libglib-2.0.so /usr/lib/libgdk.so
Гора ошибок про GTK сразу уменьшилась, но к сожалению не исчезла вовсе. Я думал, что проблема в версии fpc, поставил свежие бинарники install.sh-ом 2.6.0 c офф. сайта. Но ошибки не исчезли:
- Код: Выделить всё
fpc test.pas
Free Pascal Compiler version 2.6.0 [2011/12/23] for x86_64
Copyright (c) 1993-2011 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling ex1.pp
Linking ex1
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
ex1.o: In function `main':
ex1.pp:(.text+0x75): undefined reference to `gtk_signal_connect'
/usr/local/lib/fpc/2.6.0/units/x86_64-linux/gtk1/gtk.o: In function `GTK_GTK_CHECK_CLASS_TYPE$PGTKTYPECLASS$LONGWORD$$BOOLEAN':
gtk.pp:(.text+0x131): undefined reference to `gtk_type_is_a'
/usr/local/lib/fpc/2.6.0/units/x86_64-linux/gtk1/gtk.o: In function `GTK_GTK_IS_DATA_CLASS$POINTER$$BOOLEAN':
gtk.pp:(.text+0x314): undefined reference to `gtk_data_get_type'
/usr/local/lib/fpc/2.6.0/units/x86_64-linux/gtk1/gtk.o: In function `GTK_GTK_IS_PACKER_CLASS$POINTER$$BOOLEAN':
gtk.pp:(.text+0x1064): undefined reference to `gtk_packer_get_type'
/usr/local/lib/fpc/2.6.0/units/x86_64-linux/gtk1/gdk.o: In function `GDK_GDK_GET_ROOT_WINDOW$$PGDKWINDOW':
gdk.pp:(.text+0xdb): undefined reference to `gdk_root_window'
/usr/local/lib/fpc/2.6.0/units/x86_64-linux/gtk1/gdk.o: In function `GDK_GDK_GET_ROOT_PARENT$$PGDKWINDOW':
gdk.pp:(.text+0xeb): undefined reference to `gdk_root_parent'
ex1.pp(23,1) Error: Error while linking
ex1.pp(23,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/local/bin/ppcx64 returned an error exitcode (normal if you did not specify a source file to be compiled)
Код самой программы:
- Код: Выделить всё
program testgtk;
{$mode objfpc}
uses
glib, gtk;
begin
writeln('test');
end.
Вообще я хочу писать на GTK 2, ошибки валятся, связанные с папкой GTK 1, тут что-то не так с версиями? Помогите, добрые люди. Спасибо!