Results 1 to 6 of 6

Thread: Undefined Reference Errors Compiling Examples

  1. #1
    Join Date
    Dec 2010
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Undefined Reference Errors Compiling Examples

    So I've seen a lot of similar forum posts, tried a few things, but still haven't found an answer. When I try to compile these examples (Windows, default install options), I get loads of "undefined reference to '_imp__ZN....'" errors. I've tried commenting out the symbian: include($$QT_SOURCE_TREE...) line in the project file. I've tried run qmake, build all, rebuild all, clean all in various orders. No dice. I must be missing something pretty basic - none of the examples compile. Can somebody point me in the right direction?

  2. #2
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Undefined Reference Errors Compiling Examples

    Is Qt in your library search path?
    Horse sense is the thing that keeps horses from betting on people. --W.C. Fields

    Ask Smart Questions

  3. #3
    Join Date
    Dec 2010
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Undefined Reference Errors Compiling Examples

    Tools->Options->Qt4 Tab shows:

    -Auto-detected
    --Qt in PATH <not found>
    -Manual
    --4.7.0 c:\qt\2010.05\qt\bin\qmake.exe

    When i browse to that manual directory, everything looks in order. Is there something else I should check? Something I need to add to my system PATH var?

  4. #4
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Undefined Reference Errors Compiling Examples

    hi,
    Qt PATH must be set. try to set the PATH variable in PROJECTS->buildsettings->buildenvironment

    make sure its set

    hope it helps
    Bala

  5. #5
    Join Date
    Dec 2010
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Undefined Reference Errors Compiling Examples

    Thanks a lot for the suggestion. I tried the "Clear system environment" checkbox under build environment. That seems to set the path to C:\Qt\2010.05\mingw\bin;C:\Qt\2010.05\qt\bin
    and qtdir to C:\Qt\2010.05\qt.

    Still no dice. When I go to tools->options->qt4 the auto detect still says not found.

    Can someone using windows tell me what their path and qtdir vars are set to?

  6. #6
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Undefined Reference Errors Compiling Examples

    hi,

    Still no dice. When I go to tools->options->qt4 the auto detect still says not found
    in tools->options->qt4
    u can add ur own qt settings.
    select manual and click the + button
    then select
    C:\Qt\2010.05\qt\bin\qmake.exe

    I tried the "Clear system environment"
    try to set the
    path to C:\Qt\2010.05\mingw\bin;C:\Qt\2010.05\qt\bin
    and qtdir to C:\Qt\2010.05\qt.
    under Build environment and system environment

    run qmake and then try clean and run ur project

    Hope it helps
    Bala

Similar Threads

  1. Replies: 2
    Last Post: 27th August 2011, 12:59
  2. Replies: 3
    Last Post: 18th December 2010, 14:55
  3. Replies: 0
    Last Post: 9th April 2009, 06:12
  4. QCreator - undefined reference link errors
    By stodge in forum Newbie
    Replies: 2
    Last Post: 5th April 2009, 14:07
  5. why i am getting errors:: undefined reference to
    By arunchaudhary1983 in forum Newbie
    Replies: 5
    Last Post: 22nd October 2007, 10:33

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.