Can't find the source of unresolved external error.

I'm getting LNK2019, but as far as I know, nothing is wrong with how I called the function. The header file is as follows (BookTesting.h):

1
2
3
4
5
6
7
8
9
  #include "BookList.h"

class BookTesting
{
public:

	//Tests BookList unit.
	void BookListUnitTestv1(BookList bl);
};


Here's the call (main.cpp):

1
2
3
4
5
6
7
8
#include "BookTesting.h"

int main()
{
BookTesting bt;
BookList testBl;

bt.BookListUnitTestv1(testBl);


Function definition (BookTesting.cpp):

1
2
3
4
5
6
7
8
#include "BookTesting.h"

void BookTesting::BookListUnitTestv1(BookList bl)
{

//function definition here

}


Can anyone assist me with this? Any help would be greatly appreciated.
Last edited on
What exactly is the linker complaining about?

What about BookList.h/cpp?
Actually, when I reopened the program just now, I didn't get that error anymore, but now it's saying "The program '[6720] main.exe' has exited with code 0 (0x0)." after some reading violations. Does that have anything to do with the error I posted above?
Not enough information to spot the problem or to compile it myself.

"reading violations" implies you're attempting to access memory that doesn't belong to your program. This is usually caused by a bad pointer or an attempt to make an out of bounds reference to an array.
Does that have anything to do with the error I posted above?
No, you have some problems in your code.
Topic archived. No new replies allowed.