Hello

my Vc++6.0 program is generating many errors of follwing type

error LNK2001: unresolved external symbol "__declspec(dllimport)
public: __thiscall std::basic_ifstream<char,struct
std::char_traits<char> >::basic_ifstream<char,struct
std::char_traits<char> >(void)" (__imp_??0?$basic_ifstream@DU?$ch
ar_traits@D@std@@@std@@QAE@XZ)

For file ip/op, i have included
#include <fstream>
using namespace std;

thanks in advance

RE: linker error [_declspec(dllimport)] by apardoe

apardoe
Thu Aug 14 13:33:49 CDT 2003

>From: miahmed67@yahoo.com (seia0106)
>Newsgroups: microsoft.public.vc.language
>Subject: linker error [_declspec(dllimport)]
>Date: 30 Jul 2003 05:30:43 -0700
>
>Hello
>
>my Vc++6.0 program is generating many errors of follwing type
>
>error LNK2001: unresolved external symbol "__declspec(dllimport)
>public: __thiscall std::basic_ifstream<char,struct
>std::char_traits<char> >::basic_ifstream<char,struct
>std::char_traits<char> >(void)" (__imp_??0?$basic_ifstream@DU?$ch
>ar_traits@D@std@@@std@@QAE@XZ)
>
>For file ip/op, i have included
>#include <fstream>
>using namespace std;
>
>thanks in advance
>

Normally LNK2001 errors are the result of incorrect settings in your LIB
environment variable or lib files not being included in your project's
settings. These functions are in the CRT static libraries so they should
always be available. Without having your machine available it's hard to
diagnose.