My subdirs project is split into one folder containing a library project, and another folder containing an executable project. For some reason, when I build my projects the library file has a 0 appended to its file name, eg: instead of libMyLib.a and MyLib.dll being created, libMyLib0.a and MyLib0.dll are created instead. This causes my other project to cause an error in the build because it is searching for libMyLib.a.

Does anyone know why this is happening? I've cleaned out the folder the binaries are created in, and have remade the Makefiles with qmake. I checked my .pro files to make sure I didn't do anything silly like accidentally changing the TARGET variable.

My project files:

Library:
Qt Code:
  1. TEMPLATE = lib
  2. TARGET = AltCore
  3. VERSION = 0.0.1
  4. QT += core \
  5. opengl \
  6. gui
  7. HEADERS += src/headers/AltGlobals.h \
  8. src/headers/AltObject.h \
  9. src/headers/AltPoint.h \
  10. src/headers/AltColor.h \
  11. src/headers/AltTexture.h \
  12. src/headers/AltAnimation.h \
  13. src/headers/AltSpriteSheet.h \
  14. src/headers/AltSprite.h \
  15. src/headers/AltScreen.h
  16.  
  17. SOURCES += src/sources/AltPoint.cpp \
  18. src/sources/AltColor.cpp \
  19. src/sources/AltTexture.cpp \
  20. src/sources/AltAnimation.cpp \
  21. src/sources/AltSpriteSheet.cpp \
  22. src/sources/AltSprite.cpp \
  23. src/sources/AltScreen.cpp
  24.  
  25. FORMS +=
  26. RESOURCES +=
  27. UI_DIR = "ui"
  28.  
  29. OBJECTS_DIR = "../build/"
  30. MOC_DIR = "../build/"
  31.  
  32. debug:DESTDIR = "../bin/debug/"
  33. release:DESTDIR = "../bin/release/"
  34.  
  35. DEPENDPATH += "src/headers"
  36. INCLUDEPATH += "src/headers"
  37.  
  38. CONFIG += console
To copy to clipboard, switch view to plain text mode 

Executable:
Qt Code:
  1. TEMPLATE = app
  2. TARGET = AltTest
  3. QT += core \
  4. opengl \
  5. gui
  6. DEPENDPATH += "../AltCore/src/headers/"
  7. INCLUDEPATH += "../AltCore/src/headers/"
  8. debug:LIBS += "../bin/debug/libAltCore.a"
  9. release:LIBS += "../bin/release/libAltCore.a"
  10.  
  11. debug:DESTDIR = "../bin/debug/"
  12. release:DESTDIR = "../bin/release/"
  13.  
  14. OBJECTS_DIR = "../build/"
  15. MOC_DIR = "../build/"
  16. CONFIG += console
  17.  
  18. # Input
  19. SOURCES += Main.cpp
To copy to clipboard, switch view to plain text mode 

Subdirs project:
Qt Code:
  1. TEMPLATE = subdirs
  2. TARGET = Alt
  3. QT += core gui opengl
  4. SOURCES +=
  5. FORMS +=
  6. RESOURCES +=
  7. FORMS +=
  8. SUBDIRS = AltCore AltTest
  9. CONFIG += ordered console
To copy to clipboard, switch view to plain text mode