0

I'm actually in a project in which I use Qt and I need to use an ORM. I found QxORM. In the process of getting started with this ORM, I need to be able to compile and execute the qxBlog example provided with it. I have thoroughly followed

But when I execute the project (qxBlog) with QtCreator, I get this error

C:\Users\HP\dev\libraries\qxorm\QxOrm_1.4.2\test\qxBlog\include\precompiled.h:4: erreur : C1083: Cannot open include file: 'QxOrm.h': No such file or directory

Following this error, I compiled the QxORM library with all its dependencies to get the qxormd.dll and put either in bin or lib folder (that I created) but it didn't work.

Can anyone help me with this issue?

Thanks in advance!

I have changed the "#include " line in precompiled.h to "#include <../../include/QxOrm.h>" (relative path to QxOrm.h file) but I still get a similar error because of the includes in that file (QxOrm.h).

C:\Users\HP\dev\libraries\qxorm\QxOrm_1.4.2\include\QxOrm.h:58: erreur : C1083: Cannot open include file: 'QxPrecompiled.h': No such file or directory

I don't want to put the QxORM library in the same folder as the project. How can I successfully include Qxorm.h with all its dependencies without putting the entire library in the same folder as my project ?

Thanks in advance !

Thanks for you answer. I have added an include path in my .pro file. I get no such previous errors. Nevertheless, I get this error

"LNK1104: cannot open file 'QxOrmd.lib'"

Can anyone help me with this?

Thanks in advance.

Joel
  • 167
  • 1
  • 1
  • 11
  • That means your include path you added for the `QxOrm` headers was not correct. This is a compiler error and has nothing to do with the location of the dll or the .lib. – drescherjm Oct 17 '16 at 14:00
  • Thanks for your answer. I have corrected the **"#include "** line in **precompiled.h** to **"#include <../../include/QxOrm.h>"** (relative path to QxOrm.h file) but I still get a similar error because of the includes in that file (QxOrm.h). I don't want to put the QxORM library in the same folder as the project. How can I successfully include **Qxorm.h** with all its dependencies without putting the entire library in the same folder as my project ? Thanks in advance – Joel Oct 17 '16 at 14:31
  • That is not the correction you need / want to make. You need to add an include path to your compiler / ide / project file. – drescherjm Oct 17 '16 at 14:41
  • Thanks for you answer. I have added an include path in my .pro file. I get no such previous errors. Nevertheless, I get this error **"LNK1104: cannot open file 'QxOrmd.lib'"** – Joel Oct 17 '16 at 15:33
  • Now you have to add the link path to your linker / ide / project file. – drescherjm Oct 17 '16 at 15:54
  • This is very basic stuff. My advice is to forget about QxOrm for the moment and spend some time to learn how to use external libraries with your ide in general. – drescherjm Oct 17 '16 at 15:56
  • Hello. Thanks for you answers. I have done that and now I can execute my project, but I get this error : **Starting C:\Users\HP\dev\libraries\QxOrm_1.4.2\QxOrm\test\_bin\qxBlogCompositeKeyd.exe... The program has unexpectedly finished.** – Joel Oct 17 '16 at 16:36
  • I found a solution to the previous problem. I just had to copy QxORM.dll to the folder where the .exe is found. – Joel Oct 17 '16 at 16:48
  • Thanks a lot @drescherjm – Joel Oct 17 '16 at 16:48

1 Answers1

0

I found an answer to my question with @drescherjm help.

All I had to do was to add an include path to my .pro file. I did it by adding the following line :

INCLUDEPATH += ../../../QxOrm/include/
Joel
  • 167
  • 1
  • 1
  • 11