CMake, QxOrm

Forum for posting problems using QxOrm library

CMake, QxOrm

Postby george » Sun Jul 17, 2011 11:44 am

I've been trying to make a project using CMake and QxOrm, and although i have managed to make it work at some point, i can't run the final executable (Error : The application failed to initialize properly).

i have put all the persistence classes, in a dll.

I call them from this simple executable.

Code: Select all
#include <QDebug>

#include <QApplication>
#include <QSqlError>
#include <QTextEdit>

#include "precompiled.h"

#include "domain/core/Use.h"

int main(int argc, char *argv[])
{
   QApplication a(argc, argv);

    QFile::remove("./qxp.sqlite");
    qx::QxSqlDatabase::getSingleton()->setDriverName("QSQLITE");
    qx::QxSqlDatabase::getSingleton()->setDatabaseName("./qxp.sqlite");
    qx::QxSqlDatabase::getSingleton()->setHostName("localhost");
    qx::QxSqlDatabase::getSingleton()->setUserName("root");
    qx::QxSqlDatabase::getSingleton()->setPassword("");

    QSqlError daoError;
    daoError = qx::dao::create_table<Use>();

    use_ptr use; use.reset(new Use());
    use->m_name = "This Use";
    daoError = qx::dao::insert(use);

    QTextEdit w;

    w.setText(use->m_name);

    w.show();
    return a.exec();
}
}


If i comment the qx::dao functions everything works ok.

If can someone give me a hint, or a suggestion, i would really appreciate it.
george
 

Re: CMake, QxOrm

Postby QxOrm admin » Sun Jul 17, 2011 7:15 pm

Hi.

You have a problem with both debug and release mode ?
Can you give please :
Qt version ?
boost version?
Gcc or vc++ compiler version?

Have you tried all samples in test directory?
To verify your install it is better to first try to build and execute all samples.
QxOrm admin
 

Re: CMake, QxOrm

Postby george » Mon Jul 18, 2011 7:43 pm

i am using QTSDK 4.7.3 (with included mingw32) on windows xp with boost 1.46.1.

i have successfully compiled and run all the examples (iincluding qxDllSample).

i have tried to build qxDllSample using cmake, but no luck.

here is the cmake compile output

Image

and the source

http://chlorus.dyndns.org/public/dllCmake.zip
george
 

Re: CMake, QxOrm

Postby QxOrm admin » Sat Aug 06, 2011 2:32 pm

Hi,

Sorry for this late answer, I was into vacations !
Is your problem with CMake resolved ?
If all samples of QxOrm package build and execute correctly using qmake, I don't know if I can help you (I'm not an expert about CMake).
QxOrm admin
 

Re: CMake, QxOrm

Postby george » Sun Aug 07, 2011 9:24 am

The problem seems to be with CMake.

Anyways after strangling a couple of days with it, i decided to fall back to qmake.
george
 


Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 2 guests

cron