Created
February 6, 2012 09:30
-
-
Save MKo-xx/1751052 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ******************************************************************************** | |
// samplelib.h | |
#ifndef INCLUDED_SAMPLELIB_H | |
#define INCLUDED_SAMPLELIB_H | |
void some_func(void); | |
#endif//INCLUDED_SAMPLELIB_H | |
// ******************************************************************************** | |
// samplelib.c | |
// system | |
#include <stdio.h> | |
// local | |
#include "samplelib.h" | |
// | |
void some_func(void) | |
{ | |
printf("samplelib: some_func is called\n"); | |
} | |
void _init(void) | |
{ | |
printf("samplelib: _init is called\n"); | |
} | |
void _fini(void) | |
{ | |
printf("samplelib: _fini is called\n"); | |
} | |
// ******************************************************************************** | |
// main.c | |
// system | |
#include <stdio.h> | |
// | |
#include "samplelib.h" | |
// | |
int main(void) | |
{ | |
// | |
printf("main: main is called\n"); | |
// | |
some_func(); | |
// | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment