开发者

undefined symbols error in c++, while the header file exists

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜