i am trying to read from a ppm file and this is basicly the code i am using to do so.
when i compile it there is no errors
However when i try to build the object i get some weird errors like inappropriate types used
the basic sample for my code is
#include <fstream.h>
#include <iostream.h>
LPTSTR filename;
filename = "inputfile.txt";
ifstream file;
file.open(filename);
LPTSTR header, colour;
int width, height;
file >> header;
file >> width;
file >> height;
file >> colour;
file.close();
the errors i get are
error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall ifstream::`vbase destructor'(void)" (__imp_??_Difstream@@QAEXXZ)
ezrgb24.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall ifstream::close(void)" (__imp_?close@ifstream@@QAEXXZ)
ezrgb24.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall ios::eof(void)const " (__imp_?eof@ios@@QBEHXZ)
ezrgb24.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class istream & __thiscall istream:perator>>(int &)" (__imp_??5istream@@QAEAAV0@AAH@Z)
ezrgb24.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class istream & __thiscall istream:perator>>(char *)" (__imp_??5istream@@QAEAAV0@PAD@Z)
ezrgb24.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall ifstream:pen(char const *,int,int)" (__imp_?open@ifstream@@QAEXPBDHH@Z)
ezrgb24.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static int const filebuf:penprot" (__imp_?openprot@filebuf@@2HB)
ezrgb24.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall ifstream::ifstream(void)" (__imp_??0ifstream@@QAE@XZ)
.\Debug\ezrgb24.ax : fatal error LNK1120: 8 unresolved externals
can anybody enlighten me on what i am doing wrong or what the erros mean? and am i delaring a string correctly?
when i compile it there is no errors
However when i try to build the object i get some weird errors like inappropriate types used
the basic sample for my code is
#include <fstream.h>
#include <iostream.h>
LPTSTR filename;
filename = "inputfile.txt";
ifstream file;
file.open(filename);
LPTSTR header, colour;
int width, height;
file >> header;
file >> width;
file >> height;
file >> colour;
file.close();
the errors i get are
error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall ifstream::`vbase destructor'(void)" (__imp_??_Difstream@@QAEXXZ)
ezrgb24.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall ifstream::close(void)" (__imp_?close@ifstream@@QAEXXZ)
ezrgb24.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: int __thiscall ios::eof(void)const " (__imp_?eof@ios@@QBEHXZ)
ezrgb24.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class istream & __thiscall istream:perator>>(int &)" (__imp_??5istream@@QAEAAV0@AAH@Z)
ezrgb24.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: class istream & __thiscall istream:perator>>(char *)" (__imp_??5istream@@QAEAAV0@PAD@Z)
ezrgb24.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall ifstream:pen(char const *,int,int)" (__imp_?open@ifstream@@QAEXPBDHH@Z)
ezrgb24.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static int const filebuf:penprot" (__imp_?openprot@filebuf@@2HB)
ezrgb24.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall ifstream::ifstream(void)" (__imp_??0ifstream@@QAE@XZ)
.\Debug\ezrgb24.ax : fatal error LNK1120: 8 unresolved externals
can anybody enlighten me on what i am doing wrong or what the erros mean? and am i delaring a string correctly?