0

I'm working with Code::Blocks in C++.

I have the three folowing files :

main.cpp

#include "functions.hpp"

int main()
{
    getSourceCode("str1","str2");
    return 0;
}

functions.cpp

#include "functions.hpp"

void getSourceCode(string str1,string str2)
{
}

functions.hpp

void getSourceCode(string, string);

And I got the error 'undefined reference to 'getSourceCode(std::string, std::string)' for the line number 5 in main.cpp

Where am I wrong ?

Drakalex
  • 1,488
  • 3
  • 19
  • 39

0 Answers0