Possible Duplicate:
What is an undefined reference/unresolved external symbol error and how do I fix it?
I have main.cpp
:
#include "censorship_dec.h"
using namespace std;
int main () {
censorship();
return 0;
}
this is my censorship_dec.h
:
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
void censorship();
this is my censorship_mng.cpp
:
#include "censorship_dec.h"
using namespace std;
void censorship()
{
cout << "bla bla bla" << endl;
}
I tried to run these files in SSH (Linux), so I wrote: make main
, but I got:
g++ main.cpp -o main
/tmp/ccULJJMO.o: In function `main':
main.cpp:(.text+0x71): undefined reference to `censorship()'
collect2: ld returned 1 exit status
make: *** [main] Error 1
please help!