Quote:
Originally Posted by JaWiB
What linker errors are you getting? Maybe you want /MTd or /MLd (if compiling in debug mode)
Thanks again.
I am using /MTd.
I dont have /MLd in my option.
erm... lots of errors.
Quote:
Error 1 error LNK2005: "public: bool __thiscall std::ios_base::operator!(void)const " (??7ios_base@std@@QBE_NXZ) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 2 error LNK2005: "class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl std::endl(class std::basic_ostream<char,struct std::char_traits<char> > &)" (?endl@std@@YAAAV?$basic_ostream@DU?$char_traits@D @std@@@1@AAV21@@Z) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 3 error LNK2005: "public: void __thiscall std::basic_ofstream<char,struct std::char_traits<char> >::`vbase destructor'(void)" (??_D?$basic_ofstream@DU?$char_traits@D@std@@@std@ @QAEXXZ) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 4 error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::operator<<(class std::basic_ostream<char,struct std::char_traits<char> > & (__cdecl*)(class std::basic_ostream<char,struct std::char_traits<char> > &))" (??6?$basic_ostream@DU?$char_traits@D@std@@@std@@Q AEAAV01@P6AAAV01@AAV01@@Z@Z) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 5 error LNK2005: "public: static bool __cdecl std::char_traits<char>::eq_int_type(int const &,int const &)" (?eq_int_type@?$char_traits@D@std@@SA_NABH0@Z) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 6 error LNK2005: "public: static int __cdecl std::char_traits<char>::eof(void)" (?eof@?$char_traits@D@std@@SAHXZ) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 7 error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::flush(void)" (?flush@?$basic_ostream@DU?$char_traits@D@std@@@st d@@QAEAAV12@XZ) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 8 error LNK2005: "public: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" (?setstate@?$basic_ios@DU?$char_traits@D@std@@@std @@QAEXH_N@Z) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 9 error LNK2005: "public: class std::basic_streambuf<char,struct std::char_traits<char> > * __thiscall std::basic_ios<char,struct std::char_traits<char> >::rdbuf(void)const " (?rdbuf@?$basic_ios@DU?$char_traits@D@std@@@std@@Q BEPAV?$basic_streambuf@DU?$char_traits@D@std@@@2@X Z) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 10 error LNK2005: "public: __thiscall std::basic_ofstream<char,struct std::char_traits<char> >::basic_ofstream<char,struct std::char_traits<char> >(void)" (??0?$basic_ofstream@DU?$char_traits@D@std@@@std@@ QAE@XZ) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 11 error LNK2005: "public: void __thiscall std::basic_ofstream<char,struct std::char_traits<char> >::open(char const *,int,int)" (?open@?$basic_ofstream@DU?$char_traits@D@std@@@st d@@QAEXPBDHH@Z) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 12 error LNK2005: "public: void __thiscall std::basic_ofstream<char,struct std::char_traits<char> >::close(void)" (?close@?$basic_ofstream@DU?$char_traits@D@std@@@s td@@QAEXXZ) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 13 error LNK2005: "public: static unsigned int __cdecl std::char_traits<char>::length(char const *)" (?length@?$char_traits@D@std@@SAIPBD@Z) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 14 error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputc(char)" (?sputc@?$basic_streambuf@DU?$char_traits@D@std@@@ std@@QAEHD@Z) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 15 error LNK2005: "public: bool __thiscall std::ios_base::good(void)const " (?good@ios_base@std@@QBE_NXZ) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 16 error LNK2005: "public: void __thiscall std::basic_ostream<char,struct std::char_traits<char> >::_Osfx(void)" (?_Osfx@?$basic_ostream@DU?$char_traits@D@std@@@st d@@QAEXXZ) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 17 error LNK2005: "public: int __thiscall std::ios_base::flags(void)const " (?flags@ios_base@std@@QBEHXZ) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 18 error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > * __thiscall std::basic_ios<char,struct std::char_traits<char> >::tie(void)const " (?tie@?$basic_ios@DU?$char_traits@D@std@@@std@@QBE PAV?$basic_ostream@DU?$char_traits@D@std@@@2@XZ) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 19 error LNK2005: "public: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Lock(void)" (?_Lock@?$basic_streambuf@DU?$char_traits@D@std@@@ std@@QAEXXZ) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 20 error LNK2005: "public: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Unlock(void)" (?_Unlock@?$basic_streambuf@DU?$char_traits@D@std@ @@std@@QAEXXZ) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 21 error LNK2005: "public: int __thiscall std::ios_base::width(void)const " (?width@ios_base@std@@QBEHXZ) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 22 error LNK2005: "public: int __thiscall std::ios_base::width(int)" (?width@ios_base@std@@QAEHH@Z) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 23 error LNK2005: "public: char __thiscall std::basic_ios<char,struct std::char_traits<char> >::fill(void)const " (?fill@?$basic_ios@DU?$char_traits@D@std@@@std@@QB EDXZ) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj
Quote:
Error 24 error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,int)" (?sputn@?$basic_streambuf@DU?$char_traits@D@std@@@ std@@QAEHPBDH@Z) already defined in msvcprtd.lib(MSVCP80D.dll) main.obj