私は一生の間、何が悪いのか理解できません。
私のmakefile:
all: main.o rsa.o
g++ -Wall -o main bin/main.o bin/rsa.o -lcrypto
main.o: src/main.cpp inc/rsa.h
g++ -Wall -c src/main.cpp -o bin/main.o -I inc
rsa.o: src/rsa.cpp inc/rsa.h
g++ -Wall -c src/rsa.cpp -o bin/rsa.o -I inc
私のメインクラス:
#include <iostream>
#include <stdio.h>
#include "rsa.h"
using namespace std;
int main()
{
//RSA rsa;
return 0;
}
私の.cpp:
#include "rsa.h"
#include <iostream>
using namespace std;
RSA::RSA(){}
私の.h:
#ifndef RSA_H
#define RSA_H
class RSA
{
RSA();
};
#endif
次のエラーが発生します。
In file included from src/main.cpp:7:0:
inc/rsa.h:7:7: error: using typedef-name ‘RSA’ after ‘class’
/usr/include/openssl/ossl_typ.h:140:23: error: ‘RSA’ has a previous declaration here
私はすべてを試したような気がしますが、行き詰まっています。何か案は?