From Project Explorer, click on Import project…, then fill in the information like below screenshot and then click Finish button.Īfter project importing finished, right click on the project, select Build Targets, then Create…, and fill in install to the Target name, then click on OK. Import Postgres projectĪfter the JRE environment has been installed successfully, double click eclipse icon from Desktop to open the IDE. Make sure you choose the right eclipse binary and then fill in the Name and Comment.Įclipse requires a JRE environment to be installed, so run below command before open Eclipse. $ gnome-desktop-item-edit ~/Desktop/ -create-new $ sudo apt-get install -no-install-recommends gnome-panel -y If you prefer to open the Eclipse from Desktop, then you need to run below commands to set up the Desktop Shortcut. After the download is finished, simply untar the file to a folder, for example, /opt. Now, go to the Eclipse website and download the latest Eclipse IDE for C/C++ Developers for Linux 64-bit. To avoid importing all the generated files into Eclipse project, you should run a make clean before start next section. $ cd $HOME/sandbox/postgresĪll of PostgreSQL successfully made. Ready to install.” then we are ready to setup Eclipse IDE. After a while, if you see the message “All of PostgreSQL successfully made. It is better to run the commands below to test if everything has been set up properly before import posgtres source code into Eclipse. CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -g -O0 To verify the Makefile.global has been created properly, using vi to open it and check the CFLAG parameter to make sure -g and -O0 are set. If all the dependency has been installed properly, then Makefile.global should be generated in. CFLAG is used to specify the compile options, -O0 is used to remove code optimization. enable-debug is used to enable gdb debugging option, so that we can use Eclipse to set up a breakpoint to trace the source code. prefix is used to define the installation path, in this case, all the PostgreSQl binaries, libraries, and utilities will be installed to $HOME/eclipse-workspace configure -prefix=$HOME/eclipse-workspace/postgres -enable-debug CFLAGS='-O0' Run the command below to prepare the Makefiles for Eclipse later to use. Configure PostgreSQL and generate Makefilesīefore importing PostgreSQL source code into Eclipse as a project, we need to use the configure script provided by PostgreSQL to generate the Makefiles. Moreover, the libraries and tools required by PostgreSQL such as libreadline, zlib, bison and flex will also be installed as well. With the command above, the basic libraries and utilities for building c and cpp code will be installed, such as, dpkg-dev, gcc, g++, make and libc6-dev. $ sudo apt install -y pkg-config build-essential libreadline-dev bison flex In order to build PostgreSQL source code, we need to install the basic build dependency with below command. Now, we are on PostgreSQL 12 stable release branch. Run the commands below to check out version 12. This tutorial will use the latest PostgreSQL12 stable branch to explain how to build and debug the source code using the latest Eclipse IDE. PostgreSQL has a version 12 released in October 2019, and later was upgraded to 12.1 in November. PostgreSQL has the source code available on github, in order to check out the source code, you need to install git using the command below. Install git and checkout PostgreSQL source code The option “Minimal Installation” with web browser and basic utilities is good enough for this tutorial. Go to the Ubuntu official website to download the latest LTS Ubuntu 18.04.3 Desktop (64-bit) and Install it on a virtual machine such as VirtualBox. This tutorial provides detailed instructions to help a newbie setup the building and debugging environment with the latest Eclipse IDE for C/C++ Developers for current Postgres 12.1 release on LTS Ubuntu 18.04.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |