Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Error building a very simple project with Qt Creator on Windows
Forum Updated to NodeBB v4.3 + New Features

Error building a very simple project with Qt Creator on Windows

Scheduled Pinned Locked Moved Qt Creator and other tools
2 Posts 1 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Violet Giraffe
    wrote on last edited by
    #1

    I have a very simple project. Main .pro file:

    @
    TEMPLATE = subdirs

    SUBDIRS = sub_image

    sub_image.subdir = image
    @

    And library .pro file:

    @
    DESTDIR = ../bin
    TEMPLATE = lib
    CONFIG += staticlib

    OBJECTS_DIR = ../build
    MOC_DIR = ../build
    UI_DIR = ../build
    RCC_DIR = ../build

    HEADERS +=
    src/image.h

    SOURCES +=
    src/image.cpp

    win*{
    QMAKE_CXXFLAGS += /MP
    CXXFLAGS += /favor:blend
    }
    @

    When I build it for the first time from scratch it builds fine. However, if I delete the "build" folder where .obj files are, it's not rebuilt as usually, instead I get the error:

    C1083: Cannot open compiler generated file: '..\build\image.obj': No such file or directory

    Although when I invoke build, I see in the compile output that compiler is actually being called:

    @cd image\ && K:\Qt\qtcreator-2.7.0\bin\jom.exe -f Makefile
    K:\Qt\qtcreator-2.7.0\bin\jom.exe -f Makefile.Debug
    cl -c -nologo -Zm200 -Zc:wchar_t- /MP -Zi -MDd -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_HAVE_MMX -DQT_HAVE_3DNOW -DQT_HAVE_SSE -DQT_HAVE_MMXEXT -DQT_HAVE_SSE2 -DQT_THREAD_SUPPORT -I"k:\Qt\4.8.4\include\QtCore" -I"k:\Qt\4.8.4\include\QtGui" -I"k:\Qt\4.8.4\include" -I"k:\Qt\4.8.4\include\ActiveQt" -I"..\build" -I"k:\Qt\4.8.4\mkspecs\win32-msvc2010" -Fo..\build\ @C:\Users\Alex\AppData\Local\Temp\image.obj.7484.15.jom
    image.cpp@

    And if I delete "bin" folder, I get:

    @
    cd image\ && K:\Qt\qtcreator-2.7.0\bin\jom.exe -f Makefile
    K:\Qt\qtcreator-2.7.0\bin\jom.exe -f Makefile.Release
    lib /NOLOGO /OUT:..\bin\image.lib @C:\Users\Alex\AppData\Local\Temp\image.lib.6088.0.jom
    LINK : fatal error LNK1104: cannot open file '..\bin\image.lib'@

    If I invoke qmake from Qt Creator and then build - it builds fine, but that's not very convenient.

    Here's the full project:

    https://docs.google.com/file/d/0B8Qc2atC6FVKQ2RyOFdkWDdBZXM/edit?usp=sharing

    My other projects don't exhibit this weird behavior. Any advices on fixing welcome.

    1 Reply Last reply
    0
    • V Offline
      V Offline
      Violet Giraffe
      wrote on last edited by
      #2

      A new issue: after some doing very minor edits to the main .pro file (like reordering lines), I'm getting this message when launching build:

      Error: dependent 'image-make_default' does not exist.

      the "image" sub-project builds fine if I right-click it and select "Build", but not the main subdirs project. This happens if the subdirs project doesn't have

      @CONFIG = ordered@

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved