Categories
c++ linux postgresql

Trying postgresql c++ interface : pqxx

Postgresql database have an official interface to C programming language and a C++ interface derived from that. C++ is a different language from C and i think it will be more easier to deal with.

Lets give a try on the newest linux mint 20.

1. install libpqxx-dev package (sudo apt-get installĀ  libpqxx-dev).

2. install codelite IDE (sudo apt-get installĀ  codelite).

3. install postgresql (sudo apt-get install postgresql).

4. create an user (user1) for connecting to postgresql.

Categories
c++ codeblock IUP Windows

First IUP hello world program in C

After succesfully setting up IUP lib reference in codeblocks its time to test some IUP coding style. Download source code below.

test_iup2

In main.c file, we create some buttons and attach event handler to it. I modify it from IUP hello world sample to show how we access other controls from a event handler that only has reference to the control sending the event.

Categories
c++ codeblock IUP Windows

Using IUP on windows/mingw

IUP is a cross platform GUI library. Last time tried to figure out how to compile an IUP hello world program using codeblocks IDE. After some searching on internet finally managed to compile it. Here is the linker setting used.

Categories
c++ ubuntu wxwidgets

Installing wxWidgets on Debian based linux

Debian based linux like ubuntu and linux mint can use these steps to install wxWidgets.

$ sudo apt-get install build-essential

If we do not have a C++ compiler yet, we install the build-essential package.

I think this is an meta package that install the actual packages for programming task.

$ sudo apt-get install libwxgtk3.0-dev

This installs the wxWidgets package.

To test it with minimal console application that emit some text we will create console.cpp and compile it.

#include <wx/wx.h>

int main(int argc, char **argv)
{
wxPuts(wxT(“A wxWidgets console application”));
}

Categories
c++ wxwidgets

wxWidgets Tutorial

wxWidgets is a cross platform toolkit or framework for creating C++ GUI applications.

http://zetcode.com/gui/wxwidgets/

 

Categories
c++ freebsd

Codelite

On my experiment with FreeBSD 11.1, after some time i am installing codeblocks , an IDE for creating C/C++ program. Unfortunately codeblocks didnt work (crash) on launch. Looks like some issue on wxwidget. Dunno.

After some casual browsing on FreeBSD package/ports list on the net , i found another C/C++ IDE !

It is Codelite !

pkg install codelite

Launch codelite, automatically detect clang llvm 4 available, then do some helloworld project …

Categories
c++ codeblock manjaro wxwidgets

Starting GUI Programming using Code::Block and WxWidgets

I decide now is time for some trial of GUI programming on my manjaro linux installation. After browsing on the net for some time, tonigth im installing and using codeblock for the first time.

Lets add it to our manjaro linux system by using add remove program.