/lib3270

3270 C/C++ Access Library

Primary LanguageCGNU Lesser General Public License v3.0LGPL-3.0

TN3270 Protocol Library for Linux/Windows

Created originally as part of PW3270 application.

See more details at https://softwarepublico.gov.br/social/pw3270/

License: GPL v3 CodeQL Analytics Downloads

Installation repositories

You can find instalation repositories in SuSE Build Service:

Building for Linux

  1. Get lib3270 sources from git

    $ git clone https://github.com/PerryWerneck/lib3270.git ./lib3270
  2. Install the required libraries

    • autoconf
    • automake
    • binutils
    • coreutils
    • gcc-c++
    • gettext-devel
    • m4
    • pkgconfig
    • openssl-devel
    • dbus-1-devel
    • xz

(This command can make it easy on SuSE: grep -i buildrequires rpm/lib3270.spec | cut -d: -f2 | sudo xargs zypper in )

  1. Configure and build

    $ ./autogen.sh
    $ make clean
    $ make all

Building for Windows

Cross-compiling on SuSE Linux (Native or WSL)

  1. First add the MinGW Repositories for your SuSE version from:

    $ sudo zypper ar obs://windows:mingw:win32 mingw32
    $ sudo zypper ar obs://windows:mingw:win64 mingw64
    $ sudo zypper ref
  2. Get lib3270 sources from git

    $ git clone https://github.com/PerryWerneck/lib3270.git ./lib3270
  3. Install cross compilers

    $ ./lib3270/win/install-cross.sh --all (for 32 and 64 bits)
  4. Configure build

    $ ./lib3270/win/win-configure.sh --64 (for 64 bits)
  5. Build

    $ cd lib3270
    $ make clean
    $ make all

Windows native with MSYS2

  1. Install and update MSYS2

    • Download and install msys2 from https://www.msys2.org/ (Don't forget to update the package database and core system packages using pacman -Syu)
  2. Update system path

    • Add c:\msys64\usr\bin and c:\msys64\mingw64\bin to system path
  3. Install devel packages using pacman on mingw shell

    $ pacman -S --needed mingw-w64-x86_64-gcc automake autoconf make git pkg-config mingw-w64-x86_64-gettext mingw-w64-x86_64-openssl

    Afther this close and reopen mingw shell.

  4. Get lib3270 sources from git using the mingw shell

    $ git clone https://github.com/PerryWerneck/lib3270.git ./lib3270
  5. Build library using the mingw shell

    $ cd lib3270
    $ ./autogen.sh
    $ make all
  6. Install

    $ make install

Building for macOS (using homebrew)

  1. Install homebrew

  2. Install dependencies

    $ brew install automake binutils coreutils curl gettext libtool openldap openssl pkgconfig
  3. Use open-keg to make keg-only dependencies available during build process

    $ open-keg curl openldap openssl
  4. Configure, build and install (inside the open-keg shell opened above)

    $ ./autogen.sh --prefix="$(brew --cellar)/lib3270/5.3"
    $ make all && make install
    $ brew link lib3270

Uninstalling

  1. To uninstall

    $ brew unlink lib3270
    $ rm -fr "$(brew --cellar)/lib3270"