i am novice in reading bmp files with c++ as data and i am using EasyBMP library to do that easyly. i am facing some errors.
here is cpp code:
# include <iostream>
# include <string>
# include <cmath>
# include <algorithm>
# include <vector>
# include "EasyBMP.h"
using namespace std;
int main(){
freopen ("input.txt", "r", stdin);
freopen ("output.txt", "w", stdout);
BMP NewImage;
NewImage.SetSize (640, 480);
NewImage.SetBitDepth(32);
BMP AnotherImage;
AnotherImage.ReadFromFile("logo.bmp");
cout<<"File info:"<<'\n';
cout<<AnotherImage.TellWidth()<<"X"<<AnotherImage.TellHeight()<<
" at "<<AnotherImage.TellBitDepth()<<" BPP"<<'\n';
return 0;
}
and here is errors:
http://s020.radikal.ru/i709/1410/63/987bc0310ce4.png
(sry dont have enough reputation to upload photos here)
cant you tell me what can i do to erase this errors? thanks in advance!
It looks like the linker isn't finding the implementation of the library methods. Based on the EasyBMP documentation, it looks like you have to compile the library cpp file yourself alongside your project code. Most likely you forgot to copy the cpp file to your project directory, or depending what IDE you're using, you might need to manually add the file to the project so the compiler and linker can find it.