I don't succeed to access included function:
LineParser.h
:
typedef struct cmdLine
{
char * const arguments[MAX_ARGUMENTS];
int argCount;
char const *inputRedirect;
char const *outputRedirect;
char blocking;
int idx;
struct cmdLine *next;
} cmdLine;
cmdLine *parseCmdLines(const char *strLine);
and main.c
:
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <limits.h>
#include "LineParser.h"
#include <string.h>
int main()
{
char cwd[256];
char input[2048];
fgets(input, 2048, stdin);
cmdLine * parsedCLines= parseCmdLines(input);
return 0;
}
When trying to build it via linux terminal it doesn't succeed and I get :
undefined reference to `parseCmdLines'
collect2: error: ld returned 1 exit status
makefile:5: recipe for target 'main' failed
make: *** [main] Error 1