g++ findet lib nicht
-
Hallo,
ich will unter Linux (64Bit System) Code in ein 32Bit executable uebersetzen:
g++ -m32 -Wl,-O1 -Wl,-rpath,/usr/lib
-L/usr/lib -L/usr/X11R6/lib -lQtOpenGL -L../../Nawi/lib -lXDri.1.1.35 -lVidd -L/usr/lib -lQtGui -lQtCore \
-lGLw -lXm -lXpm -ltiff -lusb -lpthread -lglut -lGLU -Wl -lGL -lXext -lXmu -lX11
/usr/lib64/gcc/x86_64-suse-linux/4.4/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.4/../../../libQtGui.so when searching for -lQtGui
/usr/lib64/gcc/x86_64-suse-linux/4.4/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib64/libQtGui.so when searching for -lQtGui
/usr/lib64/gcc/x86_64-suse-linux/4.4/../../../../x86_64-suse-linux/bin/ld: cannot find -lQtGuiLeider liefert er mir den Fehler "skipping incompatible...". Der Grund ist wohl, dass ld versucht ein 64 Bit .so zu linken, was natuerlich nicht passt fuer ein 32 Bit executable (ich gebe ja -m32 an).
Was ich nicht verstehe: Wieso sucht er ueberhaupt in /usr/lib64? Den Pfad gebe ich doch nirgends an. Ich uebergebe ihm lediglich /usr/lib, aber da scheint er nicht zu suchen.Wie kann ich das Problem loesen?
Danke!
-
Hast du überhaupt eine 32-bit QT Bibliothek?
-
linux_c89 schrieb:
Hast du überhaupt eine 32-bit QT Bibliothek?
Das ist auch etwas seltsam bei mir. Also unter /usr/lib liegen schon tonnen von Qt Shared Objects. Aber in dem konkreten Fall fehlt z.B. der oberste Link:
lrwxrwxrwx 1 root root 17 2010-10-15 11:38 libQtGui.so.4 -> libQtGui.so.4.5.3
lrwxrwxrwx 1 root root 17 2010-10-15 11:38 libQtGui.so.4.5 -> libQtGui.so.4.5.3
-rwxr-xr-x 1 root root 10030584 2009-10-24 10:25 libQtGui.so.4.5.3Es fehlt also z.b. der oberste Link libQtGui.so auf libQtGui.so.4. Das ist definitiv auch noch ein Problem, aber ich dachte das hat mit dem jetzigen erstmal nix zu tun. Ich dachte im Moment sucht er nur faelschlicherweise in /usr/lib64, findet die .so und bricht jedoch ab, da das .so in 64 Bit ist und nicht passt.