私が持っているmain.cpp
:
#include "censorship_dec.h"
using namespace std;
int main () {
censorship();
return 0;
}
これは私のcensorship_dec.h
です:
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
void censorship();
これは私のcensorship_mng.cpp
です:
#include "censorship_dec.h"
using namespace std;
void censorship()
{
cout << "bla bla bla" << endl;
}
これらのファイルをSSH(Linux)で実行しようとしたので、次のように記述しmake main
ました。
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
助けてください!