From: | Arthur Zakirov <a(dot)zakirov(at)postgrespro(dot)ru> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Cc: | Fabiana Zioti <fabi_zioti(at)hotmail(dot)com> |
Subject: | Re: Configure Qt Creator to work with PostgreSQL to extensions development |
Date: | 2017-06-26 09:10:01 |
Message-ID: | 1775748.BSb15R5k49@zakirov |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sunday, 25 June 2017 17:34:11 MSK, Fabiana Zioti wrote:
> I'm creating an extension to PostgreSQL, with user-defined types and
> user-defined functions.
>
> Extensions can be written in C as well as C ++, correct?
> I am currently using ATOM to develop in Ubuntu. But I would like to work
> with Qt.
>
> PostgreSQL provides the tutorial for working with eclipse:
> https://wiki.postgresql.org/wiki/Working_with_Eclipse#
>
> Is there any tutorial for Qt? Or are the setup steps similar to Eclipse?
>
> Thank you very much in advance.
I am using QtCreator currently. I tried Atom and Sublime Text. But QtCreator
is more convenient to me.
In short you need to do the following things:
1 - setup code style, use tabs instead of spaces, you can setup
autoindentation
2 - create QtCreator project for PostgreSQL and your extensions by the
following way:
- select File > New File or Project > Import Project > Import Existing
Project, and choose PostgreSQL or extension folder
- in next step choose all files
- QtCreator will create 3 files: *.config, *.files, *.includes
- if you created project for an extension you need to define path to
PostgreSQL include headers. Open *.includes file and write the path there.
With QtCreator you can quickly search necessary files or methods.
https://www.dropbox.com/s/r2b7vgt0wh5ibpm/qtcreator.png?dl=0
I didn't setup other options, because I make PostgreSQL and extensions from
command line. I debug them using dbg, but you can do it also from QtCreator.
--
Arthur Zakirov
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company
From | Date | Subject | |
---|---|---|---|
Next Message | Alexander Farber | 2017-06-26 18:21:10 | ERROR: query returned no rows |
Previous Message | Alain Toussaint | 2017-06-26 03:02:41 | Re: Insertion of large xml files into PostgreSQL 10beta1 |