Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Including ASql libs in Cutelyst app #13

Closed
cezaryece opened this issue Jul 21, 2022 · 5 comments
Closed

Including ASql libs in Cutelyst app #13

cezaryece opened this issue Jul 21, 2022 · 5 comments

Comments

@cezaryece
Copy link

I build and install ASql library in my Ubuntu system and try to include it in my Cutelyst application.
My application is build with qmake, so in my .pro file I add
INCLUDEPATH+=
/usr/include/cutelyst3-qt5
/usr/include/asql-qt5

LIBS += -lCutelyst3Qt5 -lASqlQt5 -lASqlQt5Pg

and when I add imports to my cpp file (like in all examles I have found)

#include <apool.h>
#include <apg.h>

both are not found.
Same if with quotes.

If I add

#include "asql-qt5/ASql/apool.h"
#include "asql-qt5/ASql/apg.h"

both are found, but further compile errors occurs:

/usr/local/include/asql-qt5/ASql/apool.h:12: błąd: adatabase.h: No such file or directory
In file included from ../UnagiBackend/src/unagibackend.cpp:14:
/usr/local/include/asql-qt5/ASql/apool.h:12:10: fatal error: adatabase.h: No such file or directory
12 | #include <adatabase.h>

@cezaryece
Copy link
Author

What is weird, when I try to add ASql to cmake-based application like in this tutorial https://www.kdab.com/qt-allstack-part-1-setup/?utm_source=sendinblue&utm_campaign=02-22&utm_medium=email
everything works good.

So... where is problem that Cutelyst libs included same way in qmake project are working well, but not ASql libs?

@cezaryece
Copy link
Author

Well... self submit, self solved...
Seems it is problem with includes in angled vs quoted includes in QtCreator (or maybe only in qmake toolchain?)
Same code in cmake project opened in CLion builds without issues.
And.. if I include Cutelee libs to qmake project it build fine (with some mirror issue - I must add "cutelee6-qt5/" to include paths.
But in Cutelee all imports are quoted, but in ASql some are angled.
THAT IS DIFFERENCE AND PROBLEM.

@dantti
Copy link
Member

dantti commented Jul 21, 2022

the proper include now is <ASql/adatabase>

@dantti dantti closed this as completed Jul 21, 2022
@cezaryece
Copy link
Author

After fresh reinstall I even dont compile ASql and use deb package.
Still same issue with angled inlcudes in ASql headers!!
I must fork it and change <> to ""

@dantti
Copy link
Member

dantti commented Aug 1, 2022

You clearly have some issue in your cmake/setup, I use it in several projects just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants