1

I'm currently using Mac OS X 10.9.4, odb 2.3.0 and qt 5.3.

I installed odb using their unix guide http://wiki.codesynthesis.com/Using_ODB_with_Qt_Creator_on_Linux

I tried to compile the examples(odb-examples-2.3.0) from their site with qt and received this error message:

19:55:15: Running steps for project odbtest...
19:55:15: Configuration unchanged, skipping qmake step.
19:55:15: Starting: "/usr/bin/make" 
odb --database sqlite --profile qt --generate-schema --generate-query --generate-session -I/Applications/Qt/5.3/clang_64/include ../odbtest/employee.hxx
make: odb: No such file or directory
make: *** [employee-odb.cxx] Error 1
19:55:16: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project odbtest (kit: Desktop Qt 5.3.0 clang 64bit)
When executing step "Make"
19:55:16: Elapsed time: 00:00.

My .pro file looks like this(This is almost the exact copy of the example):

#-------------------------------------------------
#
# Project created by QtCreator 2014-09-07T16:51:45
#
#-------------------------------------------------

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = odbtest
TEMPLATE = app


SOURCES += main.cpp\
        mainwindow.cpp \
    driver.cxx

HEADERS  += mainwindow.h \
    database.hxx \
    employee.hxx

FORMS    += mainwindow.ui

# List of header files that should be compiled with the ODB compiler.
#
ODB_FILES += employee.hxx

# ODB compiler flags.
#
ODB_FLAGS = --database sqlite --profile qt --generate-schema --generate-query --generate-session

# Select the database we are going to use.
#
DEFINES += DATABASE_SQLITE

# Suppress unknown pragmas GCC warnings.
#
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CXXFLAGS_WARN_ON -Wno-unknown-pragmas

# Link to the ODB runtime libraries.
#
LIBS += -lodb-sqlite
LIBS += -lodb-qt
LIBS += -lodb

# ODB compilation rules. Normally you don't need to change anything here.
#

# Add the Qt headers directory to the ODB include directory list.
#
ODB_FLAGS += -I$$[QT_INSTALL_HEADERS]

# Newer versions of QtCreator do builds in a separate directory. As a
# result, we need to append the source directory to ODB files.
#
for(dir, ODB_FILES) {
  ODB_PWD_FILES += $$PWD/$${dir}
}

odb.name = odb ${QMAKE_FILE_IN}
odb.input = ODB_PWD_FILES
odb.output = ${QMAKE_FILE_BASE}-odb.cxx
odb.commands = odb $$ODB_FLAGS ${QMAKE_FILE_IN}
odb.depends = $$ODB_PWD_FILES
odb.variable_out = SOURCES
odb.clean = ${QMAKE_FILE_BASE}-odb.cxx ${QMAKE_FILE_BASE}-odb.hxx ${QMAKE_FILE_BASE}-odb.ixx ${QMAKE_FILE_BASE}.sql
QMAKE_EXTRA_COMPILERS += odb

odbh.name = odb ${QMAKE_FILE_IN}
odbh.input = ODB_PWD_FILES
odbh.output = ${QMAKE_FILE_BASE}-odb.hxx
odbh.commands = @true
odbh.CONFIG = no_link
odbh.depends = ${QMAKE_FILE_BASE}-odb.cxx
QMAKE_EXTRA_COMPILERS += odbh

I guess, qt's having trouble finding odb. I included the path to odb in qt's info.plist and launchctl, but it didn't help.

Durrahan
  • 45
  • 5
  • Is there any reason why you cannot just set the odb executable to it's absolute path? – Brian Sep 12 '14 at 20:16
  • I'm relatively new to qt and I don't really have an idea where to set the path for odb in qt. – Durrahan Sep 13 '14 at 16:31
  • I cannot speak to where the Mac qt package would install but the linux one is in /usr/include/qt4. I would imagine for you it would be in a similar folder as this since they are both Unix based systems. Also you are using Qt5 so I would change the path to express this. – Brian Sep 14 '14 at 22:39

0 Answers0