Results 1 to 4 of 4

Thread: Can't get Qt SDK to compile (Windows)

  1. #1
    Join Date
    Oct 2009
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Can't get Qt SDK to compile (Windows)

    Hi,

    All this is done on a Windows XP SP3 computer.

    I've downloaded the Qt 2009.04 SDK, and installed it. During install, I selected to also install MingW.

    After installing the SDK, I launch the "Qt Command Prompt" from the Start menu.

    From there, I run "configure.exe", answer the questions about open source vs. commercial (I chose open source), and then I run "mingw32-make".

    This go well for a while, but when the build process gets to linking the moc tool, it crashes with tons of unresolved symbols such as:

    Qt Code:
    1. release/moc.o:moc.cpp:(.text+0x78): undefined reference to `QByteArray::shared_null'
    2. ...
    3. release/moc.o:moc.cpp:(.text+0x181): undefined reference to `QByteArray::realloc(int)'
    4. ...
    5. release/moc.o:moc.cpp:(.text+0x351): undefined reference to `QByteArray::operator=(QByteArray const&)'
    6. release/moc.o:moc.cpp:(.text+0x3ac): undefined reference to `QByteArray::remove(int, int)'
    7. release/moc.o:moc.cpp:(.text+0x3cb): undefined reference to `QByteArray::prepend(char const*)'
    8. release/moc.o:moc.cpp:(.text+0x3f8): undefined reference to `QByteArray::realloc(int)'
    9. release/moc.o:moc.cpp:(.text+0x431): undefined reference to `QByteArray::realloc(int)'
    10. release/moc.o:moc.cpp:(.text+0x52c): undefined reference to `QByteArray::append(char)'
    11. release/moc.o:moc.cpp:(.text+0x5a1): undefined reference to `QByteArray::append(char const*)'
    12. release/moc.o:moc.cpp:(.text+0x6d3): undefined reference to `qFree(void*)'
    To copy to clipboard, switch view to plain text mode 
    And so on for about 2000 lines.

    Like I mentioned, this is all "out of the box", so did I forget a step somewhere ?

    I used to routinely build Qt on FreeBSD a few years back, and now I'm mostly working on Windows and thought it would be nice to give the latest Qt a try.

    It looks like a library path is not properly set for the linker, but since I've not worked with gcc for a while (and also it's my first time trying it on the Windows platform), I need help figuring out what's going on.

    Any tips/pointers ?

    Thank you

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

    Default Re: Can't get Qt SDK to compile (Windows)

    Have you been able to resolve this issue? I'm running into exactly the same problem with Qt 4.6.2 and 4.6.3 on Windows.

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

    Default Re: Can't get Qt SDK to compile (Windows)

    I had a similar problem when I was trying to build the QPSQL plugin.
    The problem was the LIB and INCLUDE environment variables missing.
    See my thread here: http://www.qtcentre.org/threads/3198...river?p=149353
    Hope this will help.

    Regards
    Daniel

  4. #4
    Join Date
    Jun 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Can't get Qt SDK to compile (Windows)

    Indeed, that was the solution, as I found out last week at StackOverflow.

Similar Threads

  1. Problem compile example in windows
    By walito in forum Newbie
    Replies: 3
    Last Post: 10th December 2008, 21:41
  2. Replies: 9
    Last Post: 8th July 2008, 23:23
  3. qtgui4.dll error in visual c++ 2005
    By Comptrol in forum Installation and Deployment
    Replies: 33
    Last Post: 19th June 2008, 07:18
  4. Project won't compile under Windows (works under Linux)
    By philski in forum Qt Programming
    Replies: 7
    Last Post: 14th September 2006, 15:29
  5. Replies: 4
    Last Post: 12th January 2006, 04:16

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.