开发者

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

开发者 https://www.devze.com 2023-01-28 18:16 出处:网络
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 videos

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

精彩评论

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

关注公众号