Seite 1 von 1

Probleme beim Compilieren

Verfasst: 10. Oktober 2006 10:43
von claes
Hallo,

ich bin neu was Qt angeht und habe ein Problem dessen Lösung ich nicht finde. Ich habe auf einem Mac 10.3 die freepascal IDE Lazarus Installiert, in die ich Qt einbidnden will.

Das hat auch soweit geklappt (hoffe ich). Wenn ich nun allerdings ein Projekt (selbst ein ganz simples, das nur aus einem button ohne Funktion besteht) compilen will bekomme ich folgenden Fehler:

--------

/usr/bin/ld: warning suggest use of -bind_at_load, as lazy binding may result in errors or different symbols being used
symbol _acosl used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _tanl used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _tanhl used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _asinl used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _atan2l used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _atanl used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _ceill used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _coshl used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _cosl used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _expl used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _floorl used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _fmodl used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _frexpl used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _hypotl used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _ldexpl used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _log10l used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _logl used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _modfl used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _powl used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _sinhl used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _sinl used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
symbol _sqrtl used from dynamic library /usr/lib/libstdc++.6.dylib(single module) not from earlier dynamic library /usr/lib/libSystem.B.dylib(ld64.o)
/usr/bin/ld: Undefined symbols:
_QPalette_color
_QPalette_create
_QPalette_destroy
_QPalette_create7
_QPalette_setColor2
project1.lpr(17,1) Error: Error while linking
Error: /usr/local/bin/ppcppc returned an error exitcode (normal if you did not specify a source file to be compiled)

-----------------
Ich benutze Lazarus v.0.9 und Qt v. 4.1.1.
Kann mir bei dem Problem jemand weterhelfen?
Vielen dank jetzt schonmal für eure Hilfe !!

Verfasst: 10. Oktober 2006 11:29
von Sym
Hi,

funktioniert das bei die mit der Konsole? Konntest Du schon Qt-Programme kompilieren?

Verfasst: 10. Oktober 2006 12:42
von claes
nein, wenn ich das Programm mit der konsole kompilieren bekomme ich den gleichen Fehler.

Wie gesagt, ich bin ganz frisch was Qt angeht. Ich konnte bis jetzt noch kein einziges Programm kompilieren (weder über die Konsole noch über den Compiler der IDE). Jedesmal kommt dieser Fehler.

Verfasst: 10. Oktober 2006 13:32
von Sym
Hmm,

da scheint was mit dem Bibliotheken nicht zu stimmen. Ich weiß, dass ich früher mit OSX 10.3 auch Probleme hatte und bin daher auf 10.4 umgestiegen.

Hast Du mal ein Projekt aus den Beispielen übersetzt? Und wie genau machst Du das?

Verfasst: 10. Oktober 2006 14:12
von claes
Ich habe mir gerad von http://users.pandora.be/Jan.Van.hijfte/ ... pcqt4.html ein demo Programm herunter geladen und mit der Konsole versucht zu kompilieren.
dabei trat folgende Fehler auf:

------------
Compiling windowflags.pas
Compiling qt4.pas
qt4.pas(6008,1) Error: Identifier not found "SetExceptionMask"
qt4.pas(6008,19) Error: Identifier not found "exDenormalized"
qt4.pas(6008,34) Error: Identifier not found "exInvalidOp"
qt4.pas(6008,46) Error: Identifier not found "exOverflow"
qt4.pas(6008,57) Error: Identifier not found "exPrecision"
qt4.pas(6008,69) Error: Identifier not found "exUnderflow"
qt4.pas(6008,81) Error: Identifier not found "exZeroDivide"
qt4.pas(6008,95) Error: Illegal expression
qt4.pas(6012) Fatal: There were 8 errors compiling module, stopping
qt4.pas(12,35) Fatal: Compilation aborted
Error: /usr/local/bin/ppcppc returned an error exitcode (normal if you did not specify a source file to be compiled)

windowflags.pas is linked as follows:
windowflags.pas: is not an object file
--------------

(windowsflags.pas ist diese demo-datei)

Der Fehler hat wohl etwas mit der letzten Zeile der qt4.pas zu tun, welche heißt:

SetExceptionMask([exDenormalized,exInvalidOp,exOverflow,exPrecision,exUnderflow,exZeroDivide]);

Weiß jemand woran es nun liet ? Der gleiche Fehler tritt auch auf, wen ich diese demo-datei mit Lazarus kompiliere. Das ist übrigens bei allen Demos so, die ich mir dort runtergeladen habe. Jedoch bei Programmen, die ich selbst schreibe bekomme ich die Fehlermeldung, die ich scon in meinem ersten post beschrieben habe.

Danke

Verfasst: 10. Oktober 2006 14:15
von claes
achja, wie mache ich da ...

ich bin nach der Beschreibung von http://wiki.lazarus.freepascal.org/Qt_Interface_Mac uner Punkt 5 vorgegangen bei dem kompilieren der Demoprogramme über die Konsole.

Ja und mit Lazarus: die datei öffnen und halt auf "Build" klicken.

Verfasst: 10. Oktober 2006 14:29
von claes
dreist und verzweifelt wie ich so bin, habe ich gerade einfach die störende Zeile aus der qt4.pas entfernt und nochmal kompiliert.

mit Lazarus: welch Wunder, kein Problem, kein Fehler: Programm wurde ordnungsgemäß ausgeführt.

mit der Konsole: ich bekomme ein änhliche Fehlermeldung wie am Anfang schon. Jedoch sind die letzten Zeilen in der neuen Fehlermeldung nicht enthalten.
Der compiler meckert nur wegen dem
symbol _xxx used from dynamic library /usr/lib/libstdc++.6.dylib ...

Also gibt es hierbei kein Problem mit:
usr/bin/ld: Undefined symbols:
_QPalette_xxx


So das wrs, ich bin vollkommen verwirrt !?! Ich hoffe ihr steigt noch da durch, denn ich tus nich mehr

Verfasst: 10. Oktober 2006 14:46
von Christian81
Frag doch mal bei Lazarus an - die haben schliesslich die Pascal-Bindings gemacht. Ausserdem wissen die bestimmt was an den Pascal falsch ist (wovon wir hier nicht mehr viel Ahnung haben würde ich mal sagen)

Verfasst: 10. Oktober 2006 15:04
von Sym
Sonst einfach mal nach

Code: Alles auswählen

usr/bin/ld: Undefined symbols:
_QPalette_xxx
im Netz suchen.

Vielleicht hilft auch das hier: http://www.macuser.de/forum/archive/ind ... 56607.html?

Verfasst: 20. November 2008 13:48
von KUser
Hi,

der Thread ist zwar schon gut zwei Jahre alt, aber mich plagen hier ähnliche Probleme.
Ich arbeite mit Kubuntu Gutsy Gibbon und nicht mit einem MAC. Mein Ziel soll es sein, unter Lazarus mit Qt/Embedded zu arbeiten und GUIs zu programmieren, die dann nicht mehr auf den XServer angewiesen sind, also auf dem Frambuffer laufen.

Habe mit von der Trolltechseite die Sourcen zu Qt/Embedded geladen und nach einem Readme installiert (make...)
Lazarus ist samt dem FPC auf neustem stand und aus dem SVN der Sourceforgeseite heruntergeladen und ohne Probleme installiert.

Auf der oben erwähnten Seite für die Demo (http://users.telenet.be/Jan.Van.hijfte/ ... pcqt4.html), habe ich mir die entsprechenden Sources für das Binding heruntergeladen und wie im Readme und auf http://wiki.lazarus.freepascal.org/inde ... or_Linux beschrieben erzeugt und in den korrekten Pafad kopiert.

Klicke ich mir eben eine GUI zusammen, die eigentlich nix kann, und möchte diese kompilieren kommen dann solche Fehler wie, kann Unit Forms nicht finden... daher werden die Compileroptionen dahingehend angepasst, dass er noch die LCL Schnittstellen richtig aufgreift und ich die Qt/Embedded Bibliotheken hinzulinke.

Sowohl über Lazarus als auch zu Fuß mit der Konsole liefert mir das Compileergebnis folgendes (Auszug):

Code: Alles auswählen

....
/usr/local/lib/libqt4intf.so: undefined reference to `QPrinter::setPaperSize(QSizeF const&, QPrinter::Unit)'
/usr/local/lib/libqt4intf.so: undefined reference to `QStyleOptionViewItemV4::QStyleOptionViewItemV4()'
/usr/local/lib/libqt4intf.so: undefined reference to `QFileDialog::setNameFilterDetailsVisible(bool)'
/usr/local/lib/libqt4intf.so: undefined reference to `QPrintPreviewWidget::setViewMode(QPrintPreviewWidget::ViewMode)'
/usr/local/lib/libqt4intf.so: undefined reference to `QGraphicsScene::font() const'
/usr/local/lib/libqt4intf.so: undefined reference to `QMdiSubWindow::mdiArea() const'
deletemetoo.lpr(16,1) Error: Error while linking
deletemetoo.lpr(16,1) Fatal: There were 1 errors compiling module, stopping
Vor den "..." stehen noch viele andere undefined references

Zu der Demo kann ich nur sagen, wo ist die? Hab in dem heruntergeladenen Archiv keine "somedemo.pas" gefunden, die ich kompilieren könnte.

Siehe bitte auch meine andere Forenbeiträge, die allerdings recht ähnlich sein dürften ;)
- http://forum.ubuntuusers.de/topic/lazar ... st-1606734
- http://www.linux-forum.de/lazarus-und-qt-19231.html
- http://www.lazarusforum.de/viewtopic.ph ... rus#p25076

Vielleicht kann mir ja jemand weiterhelfen, wäre toll!

Gruß