Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Back: DLLs with Libtool
Forward: A for DLLs
FastBack: Package Installation
Up: DLLs with Libtool
FastForward: Package Installation
Top: Autoconf, Automake, and Libtool
Contents: Table of Contents
Index: Index
About: About this document

25.4.1 DLL Support with GNU Autotools

Here are the contents of the three source files used as an example for the remainder of this chapter (for brevity, they are missing most of the special code one would normally use to maximise portability):

`hello.h' documents the interface to `libhello.dll':
#ifndef HELLO_H
#define HELLO_H 1

extern int hello (const char *who);

#endif /* !HELLO_H */

`hello.c' is the implementation of `libhello.dll':
#  include <config.h>

#include <stdio.h>

#include "hello.h"

hello (const char *who)
    printf("Hello, %s!\n", who);
    return 0;

`main.c' is the source for the executable which uses `libhello.dll':
#  include <config.h>

#include "hello.h"

main (int argc, const char *const argv[])
    return hello("World");

This document was generated by Gary V. Vaughan on February, 8 2006 using texi2html

  Published under the terms of the Open Publication License Design by Interspire