I'm testing the CLion IDE, and I'm attempting to write a minimal C++ program. Here's my code:
in main.cpp:
#include "classings.h"
int main() {
classings s;
s.doSomething();
return 0;
}
in classings.h:
class classings {
public:
void doSomething();
};
in classings.cpp:
#include <string>
#include <iostream>
#include "classings.h"
void classings::doSomething() {
std::cout << "hei" << std::endl;
}
I have no clue why this gives me this error:
Undefined symbols for architecture x86_64:
"classings::doSomething()", referenced from:
_main in main.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm on OSX 10.10.