I have header file:
dictionary.h:
#ifndef dictionary_h__
#define dictionary_h__
extern char *BoyerMoore_positive(char *string, int strLength);
extern char *BoyerMoore_negative(char *string, int strLength);
extern char *BoyerMoore_skip(char *string, int strLength);
#endif
function definations: dictionary.cpp
#include<stdio.h>
#include<string.h>
char *BoyerMoore_positive(char *string, int strLength)
{
} ---- //for each function
and main file main.cpp:
#include "dictionary.h"
#pragma GCC diagnostic ignored "-Wwrite-strings"
using namespace std;
void *SocketHandler(void *);
int main(int argv, char **argc)
{ 
----
    skp = BoyerMoore_skip(ch[i], strlen(ch[i]) );
        if(skp != NULL)
        {
            i++;
            printf("in\n");
            continue;
        }
        printf("\n hi2 \n");
        str = BoyerMoore_positive(ch[i], strlen(ch[i]) );
        str2= BoyerMoore_negative(ch[i], strlen(ch[i]) );
----
}
When I execute main.cpp
it gives:
/tmp/ccNxb1ix.o: In function `SocketHandler(void*)':
LinServer.cpp:(.text+0x524): undefined reference to `BoyerMoore_skip(char*, int)'
LinServer.cpp:(.text+0x587): undefined reference to `BoyerMoore_positive(char*, int)'
LinServer.cpp:(.text+0x5bd): undefined reference to `BoyerMoore_negative(char*, int)'
collect2: error: ld returned 1 exit status
I dont know why it could not find the function! Help appreciated!
 
     
     
    