これはおそらく単純なことですが、私には理解できません。
私のmain.cppには次のものがあります:
Image image("/path/to/image.png");
int* h = ImageProcessor::dailyPrices(image);
そして、私の ImageProcessor.h には次のものがあります。
//Maybe something is wrong with this? I am trying to forward declare.
namespace Magick
{
class Image;
}
class ImageProcessor {
public:
ImageProcessor();
virtual ~ImageProcessor();
static int* dailyPrices(const Magick::Image& abp_chart);
};
そして ImageProcessor.cpp には
int* dailyPrices(const Image& abp_chart)
{
しかし、コンパイルしようとすると、main.cpp に次のエラーが表示されます。
path/to/VendBot.cpp:17: undefined reference to `ImageProcessor::dailyPrices(Magick::Image const&)'