Hi all
I want to ask what I should do to conviently reuse(include, compile and build executable) a certain function in a large C project that doesn't expose it
For example, I want to use function defined here postgres/fe-auth-scram.c at master * postgres/postgres * GitHubin this way:
Code:
// mycode.c
#include <stdlib.h>
// what else should I include?
int main() {
char* pass = (char*) malloc(sizeof(char) * 1000);
pass = pg_fe_scram_build_secret("testpassword");
}
I'm really a beginner in C and work on Linux platform
only know there is compile, link procedure when using gcc(not learned compilation theory)
but don't know how to design a gcc command that could let me write less code to reuse that function
thanks in advance!