Previous     Contents     Index     Next     
Setup Util Programmer's Guide



Chapter 9   Compiling and Linking


The following sections will show you how to compile and link with the Setup Util.

  • Overview of Compilation and Linking

  • Compiling and Linking on UNIX

  • Compiling on Windows NT



Overview of Compilation and Linking

An installer written with the Setup Util is basically like any other C++ project. After you write and test your pre- and post-installation programs, you are ready to compile and link them.

On UNIX, this involves creating executable files. When doing this, you must include a few libraries and, optionally, some link flags. On Windows NT, both programs are part of a DLL which you should compile according to the directions provided with your development environment. When using Microsoft Visual C++ 6.0, you can specify a number of compilation flags.



Compiling and Linking on UNIX



The Setup Util was tested using the CC compiler on Solaris. While other compilers may work, this is not guaranteed. When compiling your installer project, you must include a number of libraries. When linking, you should specify several flags, which are listed below.


Required Libraries

When compiling your installer, you must include the following libraries.


Setup Util

libinstall.a


LDAP

libldap##.a


Link Flags

When linking your installer on Solaris, specify the following flags:

-lthread

-lposix4

-lsocket

-ldl

-lresolv

-lcurses

-ltermcap



Compiling on Windows NT



The Setup Util was tested using the Visual C++ 6.0 compiler on Windows NT. While other compilers may work, this is not guaranteed. When building your installer project with the Visual C++ 6.0 cl compiler, you should specify the following flags:

/nologo

/W3

/GT

/GX

/DWIN32

/D_WINDOWS

/c

/D_X86_

/Dx386

/MD

/Z7

/Yd

/D "XP_WIN32"

/DDLL

/DWINDLL


Previous     Contents     Index     Next     
Copyright (C) 2005 Red Hat, Inc. All rights reserved.
This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, v1.0 or later (the latest version is presently available at http://www.opencontent.org/openpub/

Last Updated September 21, 2001