Since version 1.2.1 the library can be used for development of progmans for the operating systems that support Objective C and the GNUstep platform. In this section of the documentation we provide instructions for installing and using the library with the GNUstep platform. In the end of the section we provide instructions for setup GNUstep in different operating systems.
Supported platforms
Today the library supports the following operating systems:
System requirements
For compiling and using library your operating system must supports:
Also the following programs can be necessary for you:
- subversion for loading and updating of the library source code
- sudo for installation of the compiled library
Depending on an operating system and version of the GNUstep installation or compilation of the additional software can be demanded.
Also you must define an environment variables GNUSTEP_HEADERS_PATH, SCL_HEADERS_PATH and SCL_LIBRARY_PATH accoring to GNUstep installation guide for your operating system.
Getting source code
You can download a library source code by using one of the following methods:
If you want using a subversion then you can download current or stable version of the library by usine one of the following commands:
svn checkout https:
svn checkout https:
Compilation and installation
After downloading and unpacking (if necessity) go to the directory with source code and execute a command:
If during compilation there are error or warning messages, it can mean the following:
- the GNUstep or required components does not installed or does not configured - see a page with instructions for GNUstep installation
- compilation is executed on the untested architecture and operating system - in this case we recommend to you to send these messages and output of the command uname -a to address samon.nosp@m.d@ma.nosp@m.c.com.
After completion of compilation execute library installation by means of a command:
Compatibility checking
The utility libtest is a special part of the library that executes check of compatibility of our code with architecture and operating system. This utility locates in the directory tests/libtest. Because in the intermediate versions this utility can differ from the release version, we give a source code of the utility main module:
#import <Foundation/Foundation.h>
#import "SCTestCases.h"
#import "SCTestDelegate.h"
#import "SCTestClass.h"
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
@try {
SCTestCases *testCases = [SCTestCases testCases];
[testCases runTestCases];
}
NSLog( @"%@", error.description);
NSLog( @"========================================================================");
NSLog(
@"Error Code: %d", error.
code);
NSLog(
@"Error ID: %@", error.
eid);
NSLog( @"========================================================================");
}
@catch (NSException *error) {
NSLog( @"%@", error.description);
NSLog( @"========================================================================");
NSLog( @"Error name: %@", error.name);
NSLog( @"Error reason: %@", error.reason);
NSLog( @"User info: %@", error.userInfo);
}
[pool drain];
return 0;
}
For compilation and running of the utility execute the following commands:
cd tests/libtest
gmake
obj/libtest
The utility executes sequence of tests, each of which is result of OK or FAILED. The architecture and operating system are compatible to library if results of all tests is OK. If any yesy returns FAILED value, we recommend this result to send us to the address samon.nosp@m.d@ma.nosp@m.c.com.
Results of the tests for the compatible systems can be obtained at the following links:
Using library in applications
For library use you need to execute the following actions:
- add the import of the main header file into the our source code:
- add into the GNUmakefile the following strings:
include $(SCL_HEADERS_PATH)/scl.make
ADDITIONAL_OBJC_LIBS += -lscl
- if your application must be executed with GUI, then the list of used libraries must be as follows:
ADDITIONAL_OBJC_LIBS += -lscl -lscl-gui -lgnustep-gui
Warning! If you are using other libraries, include them into the option ADDITIONAL_OBJC_LIBS.
We give the example of the GNUmakefile for the simple application consisting of several source files:
include $(GNUSTEP_MAKEFILES)/common.make
include $(SCL_HEADERS_PATH)/scl.make
TOOL_NAME = libtest
libtest_OBJCFLAGS += -Wno-objc-protocol-method-implementation
libtest_HEADERS = SCTestCases.h SCTestDelegate.h SCTestClass.h
libtest_OBJC_FILES = SCTestCases.m SCTestDelegate.m SCTestClass.m libtest.m
libtest_RESOURCE_FILES =
ADDITIONAL_OBJC_LIBS += -lscl
include $(GNUSTEP_MAKEFILES)/tool.make
GNUstep setup
Section contains the simple installation and configuration guide for the GNUstep platform and other necessary components under the tested operating systems. A completed installation guide can be obtained from a GNUstep official site. Detailed information about other components installation you can get from the operating system manual or official documentation.
FreeBSD
For installation of the GNUstep platform and the additional software on the FreeBSD we recommend to use build-in packages system, because the installation from a ports or sources takes a lot of time. To install a minimum necessary software execute the following commands:
pkg install gnustep
pkg install gmake
pkg install subversion
After completion of installation it's necessary to configure the GNUstep environment:
- if you are using a shell sh, bash or ksh, the add into the file /etc/login or ~/.profile the following strings:
. /usr/local/GNUstep/System/Makefiles/GNUstep.sh
export GNUSTEP_HEADERS_PATH=$GNUSTEP_SYSTEM_ROOT/Library/Headers
export SCL_HEADERS_PATH=$GNUSTEP_LOCAL_ROOT/Library/Headers/scl
export SCL_LIBRARY_PATH=$GNUSTEP_LOCAL_ROOT/Library/Libraries
- for using a GNUstep with a shell csh add the following strings into the file /etc/csh.login or ~/.login:
source /usr/local/GNUstep/System/Makefiles/GNUstep.csh
setenv GNUSTEP_HEADERS_PATH $GNUSTEP_SYSTEM_ROOT/Library/Headers
setenv SCL_HEADERS_PATH $GNUSTEP_LOCAL_ROOT/Library/Headers/scl
setenv SCL_LIBRARY_PATH $GNUSTEP_LOCAL_ROOT/Library/Libraries
DragonFly BSD
For installation GNUstep on the DragonFly BSD you must execute the following commands:
pkg install clang38
pkg install gnustep
pkg install gmake
pkg install subversion
After completion of installation it's necessary to configure the GNUstep environment:
- if you are using a shell sh, bash or ksh, the add into the file /etc/login or ~/.profile the following strings:
. /usr/local/GNUstep/System/Makefiles/GNUstep.sh
export GNUSTEP_HEADERS_PATH=$GNUSTEP_SYSTEM_ROOT/Library/Headers
export SCL_HEADERS_PATH=$GNUSTEP_LOCAL_ROOT/Library/Headers/scl
export SCL_LIBRARY_PATH=$GNUSTEP_LOCAL_ROOT/Library/Libraries
- for using a GNUstep with a shell csh add the following strings into the file /etc/csh.login or ~/.login:
source /usr/local/GNUstep/System/Makefiles/GNUstep.csh
setenv GNUSTEP_HEADERS_PATH $GNUSTEP_SYSTEM_ROOT/Library/Headers
setenv SCL_HEADERS_PATH $GNUSTEP_LOCAL_ROOT/Library/Headers/scl
setenv SCL_LIBRARY_PATH $GNUSTEP_LOCAL_ROOT/Library/Libraries
PCBSD/TrueOS
Operating system TrueOS TrueOS (previous name PCBSD) can be installed in two cases:
- desktop version with GUI
- server version
For setup GNUstep in the desktop version you must execute the following commands:
pkg install gnustep
pkg install gmake
If you install GNUstep for a server version execute the following commanfs:
pkg install subversion
pkg install gnustep
pkg install gmake
After completion of installation it's necessary to configure the GNUstep environment:
- if you are using a shell sh, bash or ksh, the add into the file /etc/login or ~/.profile the following strings:
. /usr/local/GNUstep/System/Makefiles/GNUstep.sh
export GNUSTEP_HEADERS_PATH=$GNUSTEP_SYSTEM_ROOT/Library/Headers
export SCL_HEADERS_PATH=$GNUSTEP_LOCAL_ROOT/Library/Headers/scl
export SCL_LIBRARY_PATH=$GNUSTEP_LOCAL_ROOT/Library/Libraries
- for using a GNUstep with a shell csh add the following strings into the file /etc/csh.login or ~/.login:
source /usr/local/GNUstep/System/Makefiles/GNUstep.csh
setenv GNUSTEP_HEADERS_PATH $GNUSTEP_SYSTEM_ROOT/Library/Headers
setenv SCL_HEADERS_PATH $GNUSTEP_LOCAL_ROOT/Library/Headers/scl
setenv SCL_LIBRARY_PATH $GNUSTEP_LOCAL_ROOT/Library/Libraries
OpenBSD
Before installing a GNUstep platform on the operating system OpenBSD you must define an environment variable PKG_PATH that defines a path to a packages repository.
- if you are using a shell sh, bash or ksh then execute a command:
- shell csh users must execute the following command:
In these examples it is necessary to specify the following parameters:
X.X - OpenBSD verson number (6.1 for example)
YYYY - system architecture, such as i386 or x86_64
For isntallation execute the following commands:
pkg_add subversion
pkg_add gmake
pkg_add gnustep-make
pkg_add gnustep-base
pkg_add gnustep-gui
pkg_add gnustep-back
pkg_add llvm
mkdir -p /usr/local/Local/Library
ln -s /usr/local/include /usr/local/Local/Library/Headers
ln -s /usr/local/lib /usr/local/Local/Library/Libraries
After completion of installation it's necessary to configure the GNUstep environment:
- if you are using a shell sh, bash or ksh, the add into the file /etc/login or ~/.profile the following strings:
. /usr/local/share/GNUstep/Makefiles/GNUstep.sh
export GNUSTEP_HEADERS_PATH=/usr/local/include
export SCL_HEADERS_PATH=/usr/local/include/scl
export SCL_LIBRARY_PATH=/usr/local/lib
- for using a GNUstep with a shell csh add the following strings into the file /etc/csh.login or ~/.login:
source /usr/local/share/GNUstep/Makefiles/GNUstep.csh
setenv GNUSTEP_HEADERS_PATH /usr/local/include
setenv SCL_HEADERS_PATH /usr/local/include/scl
setenv SCL_LIBRARY_PATH /usr/local/lib
NetBSD
Originally in an operating system NetBSD we planned to use GNUstep from packets as a part of system, however during testing was clarified that this version of a platform is cut strongly down - into its composition doesn't enter Objective C 2.0 therefore a row of necessary functions doesn't work. It this regard installation of the platform needs to be main from its cource codes.
Before installing you must define an environment variable PKG_PATH that defines a path to a packages repository:
- if you are using a shell sh, bash or ksh then execute a command:
- shell csh users must execute the following command:
In these examples it is necessary to specify the following parameters:
XXXX - system architecture, such as i386 or x86_64
Y.Y - NetBSD verson number (7.1 for example)
Before platform installation you must install the following required packages:
pkg_add gmake
pkg_add subversion
pkg_add fetch
pkg_add libiconv
pkg_add libxslt
pkg_add gnutls
pkg_add icu
pkg_add jpeg
pkg_add tiff
pkg_add clang
For platform installation you must configure environment variables CC and LD_LIBRARY_PATH:
- add the following strings into the files /etc/profile or ~/.profile if you using shells sh, bash or ksh:
export CC=/usr/pkg/bin/clang
export LD_LIBRARY_PATH=/usr/local/lib
- if you are using a shell csh then add into the file /etc/csh.login or ~/.login the following strings:
setenv CC /usr/pkg/bin/clang
setenv LD_LIBRARY_PATH /usr/local/lib
Attention! If you need to specify some paths to the variable LD_LIBRARY_PATH, then a path /usr/local/lib must be specified as a first path, otherwise there can be problems with an executable files linking.
You must build from a source codes the following GNUstep components:
gnustep-make
libobjc2
gnustep-base
gnustep-gui
gnustep-back
Attention! After compiling and installing a libobjc2 library you must reconfigure and reinstall a gnustep-make package.
We give an example of downloading and building of these components:
fetch ftp:
tar -xvzf gnustep-make-2.7.0.tar.gz
cd gnustep-make-2.7.0
./configure
gmake install
cd ..
fetch https:
tar -xvzf v1.8.1.tar.gz
cd libobjc2-1.8.1
gmake
gmake install
cd gnustep-make-2.7.0
./configure
gmake install
cd ..
fetch ftp:
tar -xvzf gnustep-base-1.25.0.tar.gz
cd gnustep-base-1.25.0
./configure
gmake
gmake install
cd ..
fetch ftp:
tar -xvzf gnustep-gui-0.25.1.tar.gz
cd gnustep-gui-0.25.1
./configure
gmake
gmake install
cd ..
fetch ftp:
tar -xvzf gnustep-back-0.25.1.tar.gz
cd gnustep-back-0.25.1
./configure
gmake
gmake install
cd ..
After completion of installation it's necessary to configure the GNUstep environment:
- if you are using a shell sh, bash or ksh, the add into the file /etc/login or ~/.profile the following strings:
. /usr/local/share/GNUstep/Makefiles/GNUstep.sh
export LD_LIBRARY_PATH=/usr/local/lib
export CC=/usr/pkg/bin/clang
export GNUSTEP_HEADERS_PATH=/usr/local/include
export SCL_HEADERS_PATH=/usr/local/include/scl
export SCL_LIBRARY_PATH=/usr/local/lib
- for using a GNUstep with a shell csh add the following strings into the file /etc/csh.login or ~/.login:
source /usr/local/share/GNUstep/Makefiles/GNUstep.csh
setenv LD_LIBRARY_PATH /usr/local/lib
setenv CC=/usr/pkg/bin/clang
setenv GNUSTEP_HEADERS_PATH /usr/local/include
setenv SCL_HEADERS_PATH /usr/local/include/scl
setenv SCL_LIBRARY_PATH /usr/local/lib
Debian Linux
For setup GNUstep in the operating system Debian Linux download one of the following scripts:
This script downloads and installs all necessary packages.
After completion of installation it's necessary to configure the GNUstep environment:
- if you are using a shell sh, bash or ksh, the add into the file /etc/login or ~/.profile the following strings:
export CC=clang
export CXX=clang++
export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
export GNUSTEP_HEADERS_PATH=/usr/GNUstep/Local/Library/Headers
export SCL_HEADERS_PATH=/usr/GNUstep/Local/Library/Headers/scl
export SCL_LIBRARY_PATH=/usr/GNUstep/Local/Library/Libraries
- for using a GNUstep with a shell csh add the following strings into the file /etc/csh.login or ~/.login:
setenv CC clang
setenv CXX clang++
setenv LD_LIBRARY_PATH /usr/local/lib:/usr/lib
source /usr/GNUstep/System/Library/Makefiles/GNUstep.csh
setenv GNUSTEP_HEADERS_PATH /usr/GNUstep/Local/Library/Headers
setenv SCL_HEADERS_PATH /usr/GNUstep/Local/Library/Headers/scl
setenv SCL_LIBRARY_PATH /usr/GNUstep/Local/Library/Libraries
Fedora Linux
For setup GNUstep in the operating system Fedora Linux download and execute one of the following scripts:
This script downloads and installs all necessary packages.
After completion of installation it's necessary to configure the GNUstep environment:
- if you are using a shell sh, bash or ksh, the add into the file /etc/login or ~/.profile the following strings:
export CC=clang
export CXX=clang++
export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64
. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
export GNUSTEP_HEADERS_PATH=/usr/GNUstep/Local/Library/Headers
export SCL_HEADERS_PATH=/usr/GNUstep/Local/Library/Headers/scl
export SCL_LIBRARY_PATH=/usr/GNUstep/Local/Library/Libraries
- for using a GNUstep with a shell csh add the following strings into the file /etc/csh.login or ~/.login:
setenv CC clang
setenv CXX clang++
setenv LD_LIBRARY_PATH /usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64
source /usr/GNUstep/System/Library/Makefiles/GNUstep.csh
setenv GNUSTEP_HEADERS_PATH /usr/GNUstep/Local/Library/Headers
setenv SCL_HEADERS_PATH /usr/GNUstep/Local/Library/Headers/scl
setenv SCL_LIBRARY_PATH /usr/GNUstep/Local/Library/Libraries
Arch Linux
For setup GNUstep in the operating system Arch Linux download and execute the following script:
This script downloads and installs all necessary packages.
After completion of installation it's necessary to configure the GNUstep environment:
- if you are using a shell sh, bash or ksh, the add into the file /etc/login or ~/.profile the following strings:
export CC=clang
export CXX=clang++
export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64
. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
export GNUSTEP_HEADERS_PATH=/usr/GNUstep/Local/Library/Headers
export SCL_HEADERS_PATH=/usr/GNUstep/Local/Library/Headers/scl
export SCL_LIBRARY_PATH=/usr/GNUstep/Local/Library/Libraries
- for using a GNUstep with a shell csh add the following strings into the file /etc/csh.login or ~/.login:
setenv CC clang
setenv CXX clang++
setenv LD_LIBRARY_PATH /usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64
source /usr/GNUstep/System/Library/Makefiles/GNUstep.csh
setenv GNUSTEP_HEADERS_PATH /usr/GNUstep/Local/Library/Headers
setenv SCL_HEADERS_PATH /usr/GNUstep/Local/Library/Headers/scl
setenv SCL_LIBRARY_PATH /usr/GNUstep/Local/Library/Libraries
Red Hat Enterprise Server
For setup GNUstep in the operating system Red Hat Enterprise Server download and execute the following script:
This script downloads and installs all necessary packages.
After completion of installation it's necessary to configure the GNUstep environment:
- if you are using a shell sh, bash or ksh, the add into the file /etc/login or ~/.profile the following strings:
export CC=clang
export CXX=clang++
export LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64
export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64
. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
export GNUSTEP_HEADERS_PATH=/usr/GNUstep/Local/Library/Headers
export SCL_HEADERS_PATH=/usr/GNUstep/Local/Library/Headers/scl
export SCL_LIBRARY_PATH=/usr/GNUstep/Local/Library/Libraries
- for using a GNUstep with a shell csh add the following strings into the file /etc/csh.login or ~/.login:
setenv CC clang
setenv CXX clang++
setenv LIBRARY_PATH /usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64
setenv LD_LIBRARY_PATH /usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64
source /usr/GNUstep/System/Library/Makefiles/GNUstep.csh
setenv GNUSTEP_HEADERS_PATH /usr/GNUstep/Local/Library/Headers
setenv SCL_HEADERS_PATH /usr/GNUstep/Local/Library/Headers/scl
setenv SCL_LIBRARY_PATH /usr/GNUstep/Local/Library/Libraries
x
Oracle Linux
For setup GNUstep in the operating system Oracle Linux download and execute one of the following scripts:
This script downloads and installs all necessary packages.
After completion of installation it's necessary to configure the GNUstep environment:
- if you are using a shell sh, bash or ksh, the add into the file /etc/login or ~/.profile the following strings:
export CC=clang
export CXX=clang++
export LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64
export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64
. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
export GNUSTEP_HEADERS_PATH=/usr/GNUstep/Local/Library/Headers
export SCL_HEADERS_PATH=/usr/GNUstep/Local/Library/Headers/scl
export SCL_LIBRARY_PATH=/usr/GNUstep/Local/Library/Libraries
- for using a GNUstep with a shell csh add the following strings into the file /etc/csh.login or ~/.login:
setenv CC clang
setenv CXX clang++
setenv LIBRARY_PATH /usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64
setenv LD_LIBRARY_PATH /usr/local/lib:/usr/lib:/usr/local/lib64:/usr/lib64
source /usr/GNUstep/System/Library/Makefiles/GNUstep.csh
setenv GNUSTEP_HEADERS_PATH /usr/GNUstep/Local/Library/Headers
setenv SCL_HEADERS_PATH /usr/GNUstep/Local/Library/Headers/scl
setenv SCL_LIBRARY_PATH /usr/GNUstep/Local/Library/Libraries
Ubuntu Linux
For setup GNUstep in the operating system Ubuntu download one of the following scripts:
This script downloads and installs all necessary packages.
After completion of installation it's necessary to configure the GNUstep environment:
- if you are using a shell sh, bash or ksh, the add into the file /etc/login or ~/.profile the following strings:
export CC=clang
export CXX=clang++
export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib
. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
export GNUSTEP_HEADERS_PATH=/usr/GNUstep/Local/Library/Headers
export SCL_HEADERS_PATH=/usr/GNUstep/Local/Library/Headers/scl
export SCL_LIBRARY_PATH=/usr/GNUstep/Local/Library/Libraries
- for using a GNUstep with a shell csh add the following strings into the file /etc/csh.login or ~/.login:
setenv CC clang
setenv CXX clang++
setenv LD_LIBRARY_PATH /usr/local/lib:/usr/lib
source /usr/GNUstep/System/Library/Makefiles/GNUstep.csh
setenv GNUSTEP_HEADERS_PATH /usr/GNUstep/Local/Library/Headers
setenv SCL_HEADERS_PATH /usr/GNUstep/Local/Library/Headers/scl
setenv SCL_LIBRARY_PATH /usr/GNUstep/Local/Library/Libraries