Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Error while adding a class to Qt creator project
QtWS25 Last Chance

Error while adding a class to Qt creator project

Scheduled Pinned Locked Moved Unsolved General and Desktop
makefilenew classo file errora file errormakefile error
2 Posts 1 Posters 771 Views
  • 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.
  • S Offline
    S Offline
    Sina Ranjkesh zade
    wrote on last edited by
    #1

    Hi,
    I want to add a class (.h and .cpp file) to my project in Qt creator and without any change to the auto-created files by Qt creator, I got this error whenever I 'build all' my project. (I clean all and then rebuild all).
    [Makefile:402: liblogic.a] Error 1
    ('logic' is the name of my subproject where I add the class)
    This problem doesn't happen if I remove the files from my project.
    Also, I got these warnings:
    "Makefile:3864: warning: overriding recipe for target 'moc_InputDataHandler.cpp'"
    "Makefile:3200: warning: ignoring old recipe for target 'moc_InputDataHandler.cpp'"
    "Makefile:11145: warning: overriding recipe for target 'InputDataHandler.o' "
    "Makefile:10291: warning: ignoring old recipe for target 'InputDataHandler.o' "
    ('InputDataHandler' is the name of my class)
    I'm working on Qt creator 5.13.0, Ubuntu 20. For more information, I use skycoder mvvm 13.0 in my project.
    Any help will be appreciated.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Sina Ranjkesh zade
      wrote on last edited by
      #2

      I don't know why, but it seems when I use Qt creator class definition tool, In my project's .pro file, In 'SOURCES' and 'HEADERS' part, it makes all .cpp and .h files except the two new files I've added to the project.
      By commenting the code that excludes these files in .pro, problem solved.

      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