Currently my project just has one BookPrinter.cpp file and the CMakeList.txt in its directory contains
add_executable(book_printer
BookPrinter.cpp
)
target_link_libraries(book_printer
${MD_API_LIBRARIES}
rt
z
)
Now I want to add a new class "MyBookWrapper" with MyBookWrapper.h and MyBookWrapper.cpp in the same directory. I have include BookWrapper.h
in my BookPrinter.cpp.
but when I compile I got this error
BookPrinter.cpp:blah blah blha incomprehensible code : undefined reference to `MyBookWrapper::Refresh()'
collect2: error: ld returned 1 exit status
What should I add to include this new MyBookWrapper?