Thursday, November 22, 2007
Problems with iconv
undefined reference to `_libiconv_open'
undefined reference to `_libiconv'
undefined reference to `_libiconv_close
This is due to a file which includes iconv.h
How do I solve?
just add -liconv at the end of linking statement
Wednesday, August 15, 2007
Saturday, June 2, 2007
Memory segments
Code segment:- Binary code of program that is being executed.
Data segment:- Initialised global variables and datastructure
BSS(Block Started as Symbol):- unitialised global variable datastructure.
Stack segment:- Local variable return address
Memory is allocated in heap.
Saturday, April 21, 2007
Compiling
Prepocessor--> Removes comments, Interprets the preprocessor directives.
Compiler --> Source code to assemby code
Assembler --> Creates object code
Link Editor --> combines the function defined in other source files and creates executable from object code.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Lint
It is a unix utiliy to verify C program. It helps in type checking of variable, function assignments, efficiency, unreachable codes, memeory leaks etc.
lint program.c
Tuesday, March 27, 2007
UNIX V/s Linux
Sun's Solaris, HP's HP-UX and IBM's AIX are the most popular UNIX flavors available today. They are licensed versions of UNIX and are having a significant amount of cost. Technical support is also available. On the other hand Linux is a free software alternative to the commercial flavors of UNIX and are available without any cost. But do not have a standard technical support mechanism.
Commercial versions are standard considering the requirement, development, testing and support. So each release is consistent. But Linux is very inconsistent compared to UNIX.
UNIX flavors are targeted to particular hardware architecture. But Linux is supposed to be compatible as possible.
Source code of Linux kernel is available. UNIX flavors are available as binary only. They are not modular as Linux.
File system support is limited in UNIX. But Linux supports almost all file systems.
Core applications present in UNIX and Linux are similar. Most of the open source applications are available in Linux. And these are ported to UNIX as well. But enterprise-level applications and closed-source applications will not be present in Linux but can be in UNIX.
Friday, March 23, 2007
Symbian Class naming convensions
In symbian Prefixes lile T, C, M, R has been used
T Class
Built in types.
Must not have a destructor.
eg: TInt, TBool
C Classes
Derived from CBase
Objects of a C class must always be allocated on the heap.
M Classes
Abstract interface class.
It is used to define callback interfaces or observer classes.
It has no member data and no constructor.
Static Classes
Do not have a name prefix.
Member functions can be called using scope resolution operator.
Symbian Class naming convensions
In symbian Prefixes lile T, C, M, R has been used
T Class
Built in types.
Must not have a destructor.
eg: TInt, TBool
C Classes
Derived from CBase
Objects of a C class must always be allocated on the heap.
M Classes
Abstract interface class.
It is used to define callback interfaces or observer classes.
It has no member data and no constructor.
Static Classes
Do not have a name prefix.
Member functions can be called using scope resolution operator.
IMPORT_C and EXPORT_C
EXPORT_C should preced the implementation in C++ source of a DLL function which is to be exported.
Thursday, March 22, 2007
Symbian's UI environments
Uikon-Eikon with Unicode support. Eikon was replaced in v5.1 by Uikon and device specific
Libraries.
Avkon- Nokia series 60 Ui libraries
Qikon-Sony erricson Ui libraries
Ckon- Nokia Communicator 9200 Ui libraries
OSI Reference Model
It has got a seven layer architecture.
Layer 1: Physical Layer
It defines the physical, mechanical and electrical charecteristics such as voltage, current, transmission distance, physical connectors etc.
Layer 2: Data Link Layer
Data Link Layer is devided into two. LLC(Logical Link Control), MAC(Mediam Access Control)
Layer 3: Network Layer
Routing related informations
Layer 4: Transport Layer
Layer 5: Session Layer
Layer 6: Presentation Layer
Layer 7: Application Layer
Sunday, January 28, 2007
string and charecter array
eg:
char *a="hello";
*a='b'; --> Causes runtime errors
Arrays are allocated in user data area and can be modified.
eg:
char a[]="hello";
*a='b';
cout<-->prints bello.