views:

23

answers:

0

I'm using WINARM Version 20060606 located here:

http://www.siwawi.arubi.uni-kl.de/avr_projects/arm_projects/#winarm

I want to create a simple static library as follows:

---- plus.h ------------

int plus(int x, int y);

---- plus.c ------------

#include "plus.h"

int plus(int x, int y)
{
    return (x + y);
}

Then I want to statically link this library into my program and use for example:

---- myprog.c ------------

#include "plus.h"

int main()
{
   int result = plus(3, 4);
   return result;
}

  1. How do I create the static library "plus" using WINARM?
  2. How do I link the static library from step 1 into "myprog" using WINARM?

Thanks in advance!