Skip to content

Instantly share code, notes, and snippets.

@MKo-xx
Created February 6, 2012 09:30
Show Gist options
  • Save MKo-xx/1751052 to your computer and use it in GitHub Desktop.
Save MKo-xx/1751052 to your computer and use it in GitHub Desktop.
// ********************************************************************************
// 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