-
Notifications
You must be signed in to change notification settings - Fork 0
Compiling With GCC
GCC is a free and open source compiler. Link to GCC home page: http://gcc.gnu.org/
When I started to write this library, I had not used C for a very long time. I spent a lot of time trying to understand how headers worked and how to compile a library. If you are unfamiliar with C, you will save a lot of time by doing 3 small steps to set up your project. If you are familiar with C, the way I do it is likely not exactly how you do it, but hey, I am still learning.
If you want to contribute to this project or receive latest changes, install Github for your platform. Use the graphical interface to clone this repository to your machine.
Alternative, in the Terminal window, you can type a command to clone the repository:
git clone git://github.com/bvssvni/groups.git
This creates a folder and downloads all the files.
In the Terminal window, type
make
This will create two folders 'obj' and 'bin'. In the Bin folder there should be two files:
libmemgroups.a
libmemgroups.h
The .a file is compiled code and the .h file is preprocessed header that includes all the methods in the library.
Put the following includes at top of your source code:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <stdarg.h>
#include <string.h>
#include "libmemgroups.h"
int main(int argc, char *argv[])
{
return 0;
}
Here we go!