I am trying to use a library provided by course module in C.
I have the following installed:
- MinGW32 - Base
- Visual Code
Hello.c
#include <stdio.h>
#include "libcs1010/include/cs1010.h"
int main()
{
// library method
cs1010_print_double(10);
printf("Hello, World!");
return 0;
}
Error
undefined reference to `cs1010_print_double'
collect2.exe: error: ld returned 1 exit status
Directory Structure:
└───hello.c
└───libcs1010
├───include
| └───cs1010.h
├───lib
| └───libcs1010.a
└───src
└───cs1010.c
How can I run GCC such that i can link to the libcs1010.a file?