Logo next up previous index
Next: 2. Preparing the Build Up: cross under linux Previous: cross under linux   Index


1. Introduction

1.1 Version

This is Version 1.1 of this howto, written 28. March 2003 through 29. March 2003 by Bernd Herd. See ChangeLog for a list of changes.

1.2 Printing this HOWTO

We have prepared this howto both in HTML format for the internet (which you are currently reading) and in acrobat reader PDF format, which is better suited for a nice printout.

Get the PDF-Version from http://www.herdsoft.com/ftp/downloads.html#cross .

1.3 Backgrounder

Novell Netware uses it's own unique binary file format ``NLM'' for software to be executed on the server. Support for the creation of NLM objects from C sourcecode using the GNU C Compiler is known for a very long time.

With the introduction of the new libc framework for Netware, development for Netware becomes more unix-like and therefor extending the GNU C compiler to compile C++ code for Netware became possible. The older clib platform was much more difficult to treat for the Unix-Style developer.

This document explains how to build a usable environment to compile C++ Source codes for Netware 5.1 using a GNU C Cross compiler 3.2.2 running on a Linux host.

1.4 Approach

This approach uses the GNU C compiler installed on a Linux or Windows NT/2000/XP machine using http://www.cygwin.com to compile a patched version of the GNU binutils and C compiler as a cross-compiler for Novell Netware.

All the neccessary downloading, patching and compiling is done using shell-scripts on the Linux/Windows machine that you may download from the herdsoft web server from http://www.herdsoft.com/ftp/downloads.html#cross .

The resulting cross-compiler is installed into the directory /opt/cross.

1.4.1 Using Windows for Software Development

This approach has been checked to be compatible with a recent version of the http://www.cygwin.com POSIX environment for Windows. Cygwin is a very recommendable tool for Windows software development. Installation is simply by running a file called setup.exe downloadable from http://cygwin.com/setup.exe .

Cygwin includes the neccessary GNU Compiler, make utilities etc. required to creare the cross compiler. The resulting NLM cross compiler also depends on Cygwin. The compiled NLM files do not need any Cygwin component to run.

Cygwin also brings most of the tools that make Software development easier on Linux to the Windows platform. You may run configure scripts, use sed, less, tar, X Windows and hundreds of other tools. The most important disadvantage is that Cygwins POSIX emulation makes compiler execution slower (but not execution of compiled NLMs), so for best speed use a Linux host.

1.4.2 Alternatives

There are other approaches for free NLM development. However as far as I know this is the only appraoch for a fully featured C++ compiler, the other ones are limited to C or PASCAL code. The only other way to compile C++ for Netware seems to be a special version of Metroworks CodeWarrior.

See the links section for more informations.

1.5 Prerequisites

You'll need the follwing things to follow this things:

1.6 What to expect

You may expect the follwing things to be possible:

But remember: NO WARRANTY.

1.7 What not to expect

1.8 Notes on the operating system

The libc header files define some functions that are not documented in the official documentation. The documentation says you should not call those functions because they may not work at all or only implement a subset of the expected functionality. This is no fun. Be careful. I've seen that happen with mmap, there is the usual mman.h header file and there are the usual definitions, but the function is only implemented on a level you would expect from a malloc/fopen/fread/fclose type implementation, it does not really work and may even crash the application. Since there is no way to recognize the documentation status, the configure type approach is not working here.

Another hint is never to use a production machine for development. Netware offers execution in protected storages, but obviously it is not as tight as in Linux. Sometimes I've seen crashes, maybe if a syscall is done with illegal parameters.

next up previous index
Next: 2. Preparing the Build Up: cross under linux Previous: cross under linux   Index
Herd Software Development, 28. March 2003, http://www.herdsoft.com/