Hello again friends, this time I come here, with the following question:
I have the following project structure:
editor/
Editor.pro // is a subdirs project
Bin /
Bin.pro // is a subdirs project
com/
com.pro // is a subdirs project
Common /
Common.pro // is a subdirs project
Language /
Language.pro // is a subdirs project
Core /
Core.pro // is a share library project
Php /
Php.pro // is a share library project Depends on core.pro
Project /
Project.pro // is a share library project Depends on language.pro
Examples /
Examples.pro // is a subdirs project
Createproject /
Createproject.pro // Depends on project.pro
editor/
Editor.pro // is a subdirs project
Bin /
Bin.pro // is a subdirs project
com/
com.pro // is a subdirs project
Common /
Common.pro // is a subdirs project
Language /
Language.pro // is a subdirs project
Core /
Core.pro // is a share library project
Php /
Php.pro // is a share library project Depends on core.pro
Project /
Project.pro // is a share library project Depends on language.pro
Examples /
Examples.pro // is a subdirs project
Createproject /
Createproject.pro // Depends on project.pro
To copy to clipboard, switch view to plain text mode
And the following are the respective configurations of the .pro files that I indicated in the previous structure:
Editor.pro
TEMPLATE = subdirs
SUBDIRS += \
bin \
com \
common \
examples
bin.depends = com
com.depends = common
common.depends = com
examples.depends = common
TEMPLATE = subdirs
SUBDIRS += \
bin \
com \
common \
examples
bin.depends = com
com.depends = common
common.depends = com
examples.depends = common
To copy to clipboard, switch view to plain text mode
Common.pro
TEMPLATE = subdirs
SUBDIRS += \
actions \
addons \
codeeditor \
codegenerator \
files \
highlighter \
language \
project \
utils \
workspace
actions.depends = addons
addons.depends = actions files language project utils
project.depends = language
workspace.depends = codeeditor
TEMPLATE = subdirs
SUBDIRS += \
actions \
addons \
codeeditor \
codegenerator \
files \
highlighter \
language \
project \
utils \
workspace
actions.depends = addons
addons.depends = actions files language project utils
project.depends = language
workspace.depends = codeeditor
To copy to clipboard, switch view to plain text mode
Language.pro
TEMPLATE = subdirs
SUBDIRS += \
core \
php
php.depends = core
TEMPLATE = subdirs
SUBDIRS += \
core \
php
php.depends = core
To copy to clipboard, switch view to plain text mode
Core.pro
#-------------------------------------------------
#
# Project created by QtCreator 2017-02-12T18:09:20
#
#-------------------------------------------------
QT -= gui
CONFIG += c++11
greaterThan(QT_MAJOR_VERSION, 4): QT +=
TARGET = core
TEMPLATE = lib
DEFINES += CORE_LIBRARY
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += Core.cpp \
model/ClassAbs.cpp \
model/MethodAbs.cpp \
model/ModelObj.cpp \
model/ParamAbs.cpp
HEADERS += Core.h\
core_global.h \
model/ClassAbs.h \
model/MethodAbs.h \
model/ModelObj.h \
model/ParamAbs.h
DESTDIR = ../
unix {
target.path = /usr/lib
INSTALLS += target
}
#-------------------------------------------------
#
# Project created by QtCreator 2017-02-12T18:09:20
#
#-------------------------------------------------
QT -= gui
CONFIG += c++11
greaterThan(QT_MAJOR_VERSION, 4): QT +=
TARGET = core
TEMPLATE = lib
DEFINES += CORE_LIBRARY
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += Core.cpp \
model/ClassAbs.cpp \
model/MethodAbs.cpp \
model/ModelObj.cpp \
model/ParamAbs.cpp
HEADERS += Core.h\
core_global.h \
model/ClassAbs.h \
model/MethodAbs.h \
model/ModelObj.h \
model/ParamAbs.h
DESTDIR = ../
unix {
target.path = /usr/lib
INSTALLS += target
}
To copy to clipboard, switch view to plain text mode
Php.pro
#-------------------------------------------------
#
# Project created by QtCreator 2017-02-12T18:09:45
#
#-------------------------------------------------
QT -= gui
CONFIG += c++11
greaterThan(QT_MAJOR_VERSION, 4): QT += xml xmlpatterns
TARGET = php
TEMPLATE = lib
DEFINES += PHP_LIBRARY
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
DEPENDPATH += . ../core \
../../../com/ecosoftware/console \
../../utils \
../../project
INCLUDEPATH += . ../core \
../../../com/ecosoftware/console \
../../utils \
../../project
LIBS''= -L -lcore
SOURCES += Php.cpp \
controller/PhpDef.cpp \
controller/PhpLoadLanguage.cpp \
controller/PhpParser.cpp \
controller/PhpUtils.cpp \
model/Attribute.cpp \
model/Class.cpp \
model/Const.cpp \
model/PhpClassTypeModelAbs.cpp \
model/Restriction.cpp \
model/Trait.cpp \
model/Interface.cpp \
model/Method.cpp \
model/Param.cpp
HEADERS += Php.h\
php_global.h \
controller/PhpDef.h \
controller/PhpLoadLanguage.h \
controller/PhpParser.h \
controller/PhpUtils.h \
model/Attribute.h \
model/Class.h \
model/Const.h \
model/Param.h \
model/PhpClassTypeModelAbs.h \
model/Restriction.h \
model/Interface.h \
model/Method.h \
model/Trait.h
DESTDIR = ../
unix {
target.path = /usr/lib
INSTALLS += target
}
#-------------------------------------------------
#
# Project created by QtCreator 2017-02-12T18:09:45
#
#-------------------------------------------------
QT -= gui
CONFIG += c++11
greaterThan(QT_MAJOR_VERSION, 4): QT += xml xmlpatterns
TARGET = php
TEMPLATE = lib
DEFINES += PHP_LIBRARY
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
DEPENDPATH += . ../core \
../../../com/ecosoftware/console \
../../utils \
../../project
INCLUDEPATH += . ../core \
../../../com/ecosoftware/console \
../../utils \
../../project
LIBS''= -L -lcore
SOURCES += Php.cpp \
controller/PhpDef.cpp \
controller/PhpLoadLanguage.cpp \
controller/PhpParser.cpp \
controller/PhpUtils.cpp \
model/Attribute.cpp \
model/Class.cpp \
model/Const.cpp \
model/PhpClassTypeModelAbs.cpp \
model/Restriction.cpp \
model/Trait.cpp \
model/Interface.cpp \
model/Method.cpp \
model/Param.cpp
HEADERS += Php.h\
php_global.h \
controller/PhpDef.h \
controller/PhpLoadLanguage.h \
controller/PhpParser.h \
controller/PhpUtils.h \
model/Attribute.h \
model/Class.h \
model/Const.h \
model/Param.h \
model/PhpClassTypeModelAbs.h \
model/Restriction.h \
model/Interface.h \
model/Method.h \
model/Trait.h
DESTDIR = ../
unix {
target.path = /usr/lib
INSTALLS += target
}
To copy to clipboard, switch view to plain text mode
Project.pro
#-------------------------------------------------
#
# Project created by QtCreator 2017-02-12T18:33:25
#
#-------------------------------------------------
QT -= gui
CONFIG += c++11
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets xml xmlpatterns
TARGET = project
TEMPLATE = lib
DEFINES += PROJECT_LIBRARY
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
DEPENDPATH += . ../language/core \
../language/php
INCLUDEPATH += . ../language/core \
../language/php
SOURCES += \
view/ProjectDlg.cpp \
controller/Manifest.cpp \
controller/ProjectBuilder.cpp \
model/Project.cpp
HEADERS +=\
project_global.h \
view/ProjectDlg.h \
controller/Manifest.h \
controller/ProjectBuilder.h \
model/Project.h
DESTDIR = ../
unix {
target.path = /usr/lib
INSTALLS += target
}
FORMS += \
view/ProjectDlg.ui
#-------------------------------------------------
#
# Project created by QtCreator 2017-02-12T18:33:25
#
#-------------------------------------------------
QT -= gui
CONFIG += c++11
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets xml xmlpatterns
TARGET = project
TEMPLATE = lib
DEFINES += PROJECT_LIBRARY
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
DEPENDPATH += . ../language/core \
../language/php
INCLUDEPATH += . ../language/core \
../language/php
SOURCES += \
view/ProjectDlg.cpp \
controller/Manifest.cpp \
controller/ProjectBuilder.cpp \
model/Project.cpp
HEADERS +=\
project_global.h \
view/ProjectDlg.h \
controller/Manifest.h \
controller/ProjectBuilder.h \
model/Project.h
DESTDIR = ../
unix {
target.path = /usr/lib
INSTALLS += target
}
FORMS += \
view/ProjectDlg.ui
To copy to clipboard, switch view to plain text mode
Examples.pro
TEMPLATE = subdirs
SUBDIRS += \
createproject
TEMPLATE = subdirs
SUBDIRS += \
createproject
To copy to clipboard, switch view to plain text mode
Createproject.pro
#-------------------------------------------------
#
# Project created by QtCreator 2017-02-13T12:14:49
#
#-------------------------------------------------
QT += core gui
CONFIG += c++11
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets xml xmlpatterns
TARGET = createproject
TEMPLATE = app
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
DEPENDPATH += . ../../common/project
INCLUDEPATH += . ../../common/project
LIBS''= -L../../common -lproject
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
#-------------------------------------------------
#
# Project created by QtCreator 2017-02-13T12:14:49
#
#-------------------------------------------------
QT += core gui
CONFIG += c++11
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets xml xmlpatterns
TARGET = createproject
TEMPLATE = app
# The following define makes your compiler emit warnings if you use
# any feature of Qt which as been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
DEPENDPATH += . ../../common/project
INCLUDEPATH += . ../../common/project
LIBS''= -L../../common -lproject
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
To copy to clipboard, switch view to plain text mode
All this, for the following, if I build each library separately no problem, all compile.
But when I decide to compile createproject (which is a test executable) to test the correct execution of the code and the links to the libraries, I get the following error:
../../../../editor/common/language/php/model/Attribute.h:8:28: fatal error: model / ModelObj.h: No such file or directory
#include "model / ModelObj.h"
^
../../../../editor/common/language/php/model/Attribute.h:8:28: fatal error: model / ModelObj.h: No such file or directory
#include "model / ModelObj.h"
^
To copy to clipboard, switch view to plain text mode
I have reviewed everything and from what I see, everything is fine, or so I think. Even if I build createproject without run command, if it compiles.
I'm working on
Debian 9 64bit
Qt 5.7.1
QtCreator 4.2.0
What can I be doing wrong? If you need any additional information let me know.
Thanks in advance for your answers and help.
Bookmarks