Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8810881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:13:35+00:00 2026-06-14T03:13:35+00:00

I am attempting to compile a software that I have built using Qt, ITK,

  • 0

I am attempting to compile a software that I have built using Qt, ITK, VTK, using mingw32 on Windows 7. I have successfully done this on many computers, but I am having trouble on my laptop.

I made a mistake when I first installed Qt on this machine, in that I installed the “msvc2010” or visual studio verision of Qt. I had VS installed, and this is what it defaulted to, and I did not change it. Realizing my mistake, I uninstalled all traces of this Qt, and installed the Mingw32 version. The exact version I downloaded was: Qt libraries 4.8.3 for Windows (minGW 4.4, 317 MB)

I installed mingw32, installed qt, all nice and dandy, and now I am compiling my software. It builds beautifully, but during the linking stage I get the following nasty error:

mingw32-make[2]: *** No rule to make target 'C:/QtSDK/Desktop/Qt/4.8.1/msvc2010/
lib/QtOpenGL4.dll', needed by 'x.exe'.  Stop.
CMakeFiles\Makefile2:62: recipe for target 'CMakeFiles/x.dir/all' failed
mingw32-make[1]: *** [CMakeFiles/x.dir/all] Error 2
Makefile:74: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

Where x is the name of my project.

Note the make target: C:/QtSDK/Desktop/Qt/4.8.1/msvc2010/lib/QtOpenGL4.dll. This is NOT the correct place to look for the DLLs. It is looking at the lib location of my first installation of Qt. The QtSDK folder does not even exist anymore, the new version is under a different folder.

This is sadly also reflected in the link.txt under CMakeFiles that is generated in the build folder by cmake. One of the entries is:
C:\QtSDK\Desktop\Qt\4.8.1\msvc2010\lib\QtGui4.dll
along with many other DLLs.

Clearly, the problem is that Cmake is generating targets for the previous version of Qt.

How can I erase whatever ridiculous cache this is originating from, so that it does not do this? I have reinstalled Cmake, I have reinstalled Qt, I have done everything I can think of. I have verified that the Cmake variable are all pointing to the correct Qt folder (the other one does not exist, so no way we could get to the linking stage if they were incorrect).

Thank you so much.

EDIT:

I get this very pertinent warning, that has the wretched file path in it:

CMake Warning (dev) at CMakeLists.txt:22 (ADD_EXECUTABLE):
 Policy CMP0003 should be set before this line.  Add code such as

if(COMMAND cmake_policy)
  cmake_policy(SET CMP0003 NEW)
   endif(COMMAND cmake_policy)

 as early as possible but after the most recent call to
 cmake_minimum_required or cmake_policy(VERSION).  This warning appears
 because target "x" links to some libraries for which the linker must
 search:

comctl32, vfw32, ws2_32, wsock32, -lgdi32, opengl32

 and other libraries with known full path:

C:/Qt/4.8.3/lib/libQtGui4.a
C:/ITK/lib/libitksys-4.1.dll.a
C:/VTK/bin/libQVTK.a
C:/QtSDK/Desktop/Qt/4.8.1/msvc2010/lib/QtOpenGL4.dll

 CMake is adding directories in the second list to the linker search path in
 case they are needed to find libraries from the first list (for backwards
 compatibility with CMake 2.4).  Set policy CMP0003 to OLD or NEW to enable
 or disable this behavior explicitly.  Run "cmake --help-policy CMP0003" for
 more information.
 This warning is for project developers.  Use -Wno-dev to suppress it.

I added the “NEW” policy, and the warning went away, but I still have the same problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T03:13:36+00:00Added an answer on June 14, 2026 at 3:13 am

    The problem turned out to be that I had installed VTK while I had the old Qt (configured for VS2010 installed). When I included VTK’s libraries, it also included DLLs from Qt–but it was still pointing to the old Qt.

    I reinstalled VTK, and we got past this step.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to compile a file that instantiates this class. GCC gives me cryptic
I am attempting to compile some code, but am running into some problems that
I am attempting to compile a c++ class using gcc. Due to the nature
I am trying to start using cython and and attempting to compile my first
I am attempting to compile and run a C program in Xcode. This program
I am attempting to compile wxWidgets 2.8.11 on Windows 7 x64 for use with
I'm attempting to compile a working copy of the MagickNet class library (DLL) using
I'm attempting to compile some C# with gmcs version 2.11.0 that includes System.Tuple. Supposedly
In attempting to compile ICU49 using Android NDKv7b, I ran into the following: /home/tim/icu49/icu/source/common/putil.cpp:
So I am attempting to compile SQLite (using a different Target Device then is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.