Sorry if I'm asking a dumb question, but I've been stuck on this one for quite some time now. So, I'm trying to compile a program using 开发者_StackOverflowcmake, that calls functions from a videosource.cpp file, with its corresponding videosource.h file.
The compiler finds the file, but when linking makes this error:
Undefined symbols:
"VideoSourceFactory::construct()", referenced from:
_main in main.cpp.o
However, in the videosource.h, the function is defined, as:
class VideoSourceFactory {
public:
VideoSourceFactory();
...}
Does anyone have an idea what can be causing this kind of errors to happen??
Thanks in advance!
videosource.cpp file must be added to the files list, together with main.cpp.
精彩评论