This is a very basic problem that's frustrating me at the moment. Let's say within a single solution, I have two projects. Let's call the first project SimpleMath. It has one header file "Add.h" which has
int add(int i, int j)
and the implementation "Add.cpp" which has
int add(int i, int j) {
return i+j;
}
Now let's say in a second project I want to use the add function. However, this code:
#include "..\SimpleMath\Add.h"
int main() {
add(1, 2);
}
results in "unresolved external symbol". How do I get the second program to "know" about the actual implementation in the .cpp file. As a side note all code is fictional this is not how I actually program.