Results 1 to 8 of 8

Thread: Link error when compiling Qt 5.1.0 project in Visual Studio 2010

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2010
    Posts
    99
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    3

    Question Link error when compiling Qt 5.1.0 project in Visual Studio 2010

    Hi,

    A while ago i upgraded from Qt 4.x to 5.1.0. I then got a new computer (Windows 7, 64 bit) on which i installed a clean 5.1.0. But i have never been able to successfully compile my project with 5.1.0. Now i've come back to the project to try again, and it all seems to be compiling ok, but when it gets to linking it says it cannot find "qtmaind.lib":

    2>------ Rebuild All started: Project: Window Detective, Configuration: Debug Win32 ------
    2>Build started 2/01/2014 1:05:13 PM.
    2>_PrepareForClean:
    2> Deleting file "Debug\obj\Window Detective.lastbuildstate".
    2>InitializeBuildStatus:
    2> Touching "Debug\obj\Window Detective.unsuccessfulbuild".
    2>CustomBuild:
    2> Moc'ing ...
    ...
    2> Rcc'ing qt_resources.qrc...
    2>ClCompile:
    2> Window.cpp
    ...
    2> Generating Code...
    2>LINK : fatal error LNK1104: cannot open file 'qtmaind.lib'
    2>
    2>Build FAILED.
    2>
    2>Time Elapsed 00:07:50.17
    ========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========
    I have installed Qt to "C:\dev\Qt". I have the Qt Visual Studio addon, which i think should set the QtDir variable itself, and the project's library directories is set to "$(QtDir)\lib;$(LibraryPath)". I've also added "qtmaind.lib" to the list of additional dependencies.

    Below is the linker command line:
    /OUT:"C:\dev\projects\Window Detective\src\..\Window Detective.exe" /VERBOSE /NOLOGO "Psapi.lib" "qtmaind.lib" "Qt5Cored.lib" "Qt5Guid.lib" "Qt5Widgetsd.lib" "Qt5Xmld.lib" "kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib" "odbc32.lib" "odbccp32.lib" "C:\dev\projects\Window Detective\src\hook\Debug\WD_Hook.lib" /MANIFEST /ManifestFile:"Debug\obj\Window Detective.exe.intermediate.manifest" /ALLOWISOLATION /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\dev\projects\Window Detective\src\Debug\Window Detective.pdb" /SUBSYSTEM:WINDOWS /PGD:"C:\dev\projects\Window Detective\Window Detective.pgd" /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:QUEUE
    As you can see, the library is mentioned there, and it definitely exists on disk, so i cannot see why the linker cannot find it.
    Last edited by xtal256; 2nd January 2014 at 02:22. Reason: changed code tags to quote
    [Window Detective] - Windows UI spy utility
    [War Thunder]

Similar Threads

  1. Replies: 2
    Last Post: 29th September 2013, 07:05
  2. Replies: 0
    Last Post: 19th March 2013, 18:48
  3. Replies: 2
    Last Post: 26th November 2012, 08:09
  4. Replies: 4
    Last Post: 13th November 2012, 21:46
  5. Problem compiling QT 4,8,0 in windows 7 x64 with visual studio 2010
    By phate89 in forum Installation and Deployment
    Replies: 0
    Last Post: 11th January 2012, 17:14

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
  •  
Qt is a trademark of The Qt Company.