Closed jimisdam closed 6 years ago
It looks like you didn't link cpr, compile it and link (adding ../../deps/cpr/cpr/*.cpp
should also work).
Thank you a lot, it worked! But, why would this happen, even following the given steps?
Here how I understand it. take a look at this code.
void exampleFunction();
int main() {
exampleFunction();
}
Although, this is valid code if exampleFunction
is defined later. However, afterwards the linker will look for the definition of exampleFunction
and not find it so it gives an similar to what you see above. Fixing this is very simple.
void exampleFunction();
int main() {
exampleFunction();
}
void exampleFunction() {
int a = 4;
a = 3;
}
I followed the steps for compiling the source and when I compile the example hello, I get this:
What's wrong with it? I'm using Fedora 28.