Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Hello: Hello world


Example code

These are the main files contained in the examples. Some extra files may be needed to run the examples, and these will be found in the appropriate examples directory.

Found in: examples\stdlib\Hello

// SLHELLO.C
//
// Copyright (c) 1997-1999 Symbian Ltd.  All rights reserved.
//

/* 
 * The classic "Hello World" program
 */

#include <stdio.h>

int main (int argc, char *argv[])
    {
    argc=0;
    argv=NULL;
    printf("Hello World\n");
    return 0;
    }

// BLD.INF
// Component description file 
//
// Copyright (c) 2000 Symbian Ltd.  All rights reserved.

PRJ_MMPFILES

Hello.mmp

// HELLO.MMP
//
// Copyright (c) 1997-1999 Symbian Ltd.  All rights reserved.
//

TARGET      hello.exe
TARGETTYPE  exe
UID       0
VENDORID 0x70000001
SOURCEPATH  .
SOURCE      slhello.c
SYSTEMINCLUDE   \epoc32\include\libc  \epoc32\include 

LIBRARY     estlib.lib euser.lib 
STATICLIBRARY   ecrt0.lib

[Top]


Description

Hello is the most basic example demonstrating how to use STDLIB.

The main point of interest in this program is the .mmp project specification file, which specifies the epoc32\include\libc\ include directory and links to estlib.lib, the C standard library, and the static library ecrt0.lib.