I cannot for the life of me figure out what's wrong.
My 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
My main class:
#include <iostream>
#include <stdio.h>
#include "rsa.h"
using namespace std;
int main()
{
//RSA rsa;
return 0;
}
My .cpp:
#include "rsa.h"
#include <iostream>
using namespace std;
RSA::RSA(){}
My .h:
#ifndef RSA_H
#define RSA_H
class RSA
{
RSA();
};
#endif
I'm getting the following error:
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
I feel like I've tried everything but I'm stuck. Any ideas?