Results 1 to 3 of 3

Thread: Library and Subdirs building problem

  1. #1
    Join Date
    Jul 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Library and Subdirs building problem

    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 

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Library and Subdirs building problem

    It's happening because of the VERSION property. Remove it and the 0 will go away as well.

  3. #3
    Join Date
    Jul 2008
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: Library and Subdirs building problem

    Thank you!

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.