Results 1 to 2 of 2

Thread: QVariantAnimation instantiation runtime crash; symbol lookup error: undefined symbol

  1. #1
    Join Date
    Jun 2010
    Posts
    36
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default QVariantAnimation instantiation runtime crash; symbol lookup error: undefined symbol

    I'm getting this weird runtime crash when instantiating QVariantAnimation or QPropertyAnimation. It appears this happens when the program doesn't link appropriately the class. But I have double checked my simple project and can't see anything wrong.

    Qt Code:
    1. #include <QtCore/QVariantAnimation>
    2. #include <QtCore/QEasingCurve>
    3.  
    4. class MyAnimacion : public QVariantAnimation {
    5. public:
    6. MyAnimacion() : QVariantAnimation() {}
    7. ~MyAnimacion(){}
    8. void updateCurrentValue( const QVariant & value ) {}
    9. };
    10. int main() {
    11. MyAnimacion myAnimacion;
    12. return 0;
    13. }
    To copy to clipboard, switch view to plain text mode 

    In Eclipse:
    Qt Include Directory: /home/user/DEV/SDK/QtSDK/qt/include
    Qt Link Directory: /home/user/DEV/SDK/QtSDK/qt/lib
    Link Library: QtCore

    Qt Code:
    1. make all
    2. Building file: ../src/AnimationTest.cpp
    3. Invoking: GCC C++ Compiler
    4. g++ -I/home/user/DEV/SDK/QtSDK/qt/include -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/AnimationTest.d" -MT"src/AnimationTest.d" -o"src/AnimationTest.o" "../src/AnimationTest.cpp"
    5. Finished building: ../src/AnimationTest.cpp
    6.  
    7. Building target: AnimationTest
    8. Invoking: GCC C++ Linker
    9. g++ -L/home/user/DEV/SDK/QtSDK/qt/lib -o"AnimationTest" ./src/AnimationTest.o -lQtCore
    10. Finished building target: AnimationTest
    To copy to clipboard, switch view to plain text mode 

    Runtime Crash:
    Qt Code:
    1. ../AnimationTest: symbol lookup error: ../AnimationTest: undefined symbol: _ZN17QVariantAnimationC2EP7QObject
    To copy to clipboard, switch view to plain text mode 

    I don't know if QVariantAnimation is restricted to QtGui, I'm trying to use it to manually update the position of stuff in my game with the keyValueAt method.

  2. #2
    Join Date
    Jun 2010
    Posts
    36
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QVariantAnimation instantiation runtime crash; symbol lookup error: undefined sym

    Ok. I figured out that if I create a QT Console project with Eclipse's QT plugin, this crash does not happen. So, there must be something missing in my c++ project configuration.

    The strange thing is that this is not the first qt class I use in my current project. I was using a lot of QtCore classes and QtXml previous to this problem, and everything compiled, linked and worked. But for some reason this QVariantAnimation is crashing...

    The only difference I can see is that "Qt projects" have this .pro file that normal C++ projects don't have. But I don't see anything special from it apart from specifying the code structure and used qt libs.

    Thanks for any hint.
    Last edited by toglia3d; 22nd June 2010 at 21:47.

Similar Threads

  1. symbol lookup error
    By knishaq in forum Qt Programming
    Replies: 1
    Last Post: 22nd June 2010, 16:22
  2. Dynamic load QT Plugin - symbol lookup error
    By qlands in forum Qt Programming
    Replies: 4
    Last Post: 2nd May 2010, 20:37
  3. QtPlugin and undefined symbol
    By Mikoskay in forum Qt Programming
    Replies: 1
    Last Post: 11th February 2010, 13:04
  4. QT-Embedded Symbol Lookup Error
    By augusbas in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 23rd June 2009, 06:01
  5. symbol lookup error when using plugins
    By macbeth in forum Qt Programming
    Replies: 3
    Last Post: 29th July 2006, 10:54

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.